Hi, i'm new in sql server 2005 technology and i have a lot of questions in my head.
Can i create a screen with the reporting services as i can create it with the asp.net, i mean, can i design a screen with 3 combo boxes that conditioned the results shown in the linked report?.
Thank you
Manuel
There's no control in the Report Designer that is similar to the combobox or dropdownlist controls in ASP.NET. Your best bet would be to create your report and have its data driven by the dropdownlist controls from your ASP.NET app.
Basically pass in what you need from your .NET app to your report.
|||You must create ReportParameters based on the dropdownlist, and then add the ReportParametrs to the ReportServer class of the ReportViewer Control to send it.
Here is a little example.
private void cargarReporte()
{
string usuario = ConfigurationSettings.AppSettings["Usuario"].ToString();
string clave = ConfigurationSettings.AppSettings["Clave"].ToString();
string dominio = ConfigurationSettings.AppSettings["Dominio"].ToString();
string reportserver = ConfigurationSettings.AppSettings["ReportServer"].ToString();
string reportfolder = ConfigurationSettings.AppSettings["ReportFolder"].ToString();
int NmCiclo = Convert.ToInt32(Request.QueryString["NmCiclo"]);
int NmEmpresa = Convert.ToInt32(Request.QueryString["NmEmpresa"]);
int NmCargoEvaluada = Convert.ToInt32(Request.QueryString["NmCargoEvaluada"]);
int NmPersonaEvaluada = Convert.ToInt32(Request.QueryString["NmPersonaEvaluada"]);
rptviewer.ServerReport.ReportServerUrl = new Uri(reportserver);
rptviewer.ServerReport.ReportPath = reportfolder + "RPT_EvaluacionRequisitos";
x.ReportViewerCredentials rvwCreds = new x.ReportViewerCredentials(usuario, clave, dominio);
rptviewer.ServerReport.ReportServerCredentials = rvwCreds;
ReportParameter pNmEmpresa = new ReportParameter("NmEmpresa", NmEmpresa.ToString());
ReportParameter pNmCiclo = new ReportParameter("NmCiclo", NmCiclo.ToString());
ReportParameter pNmCargoEvaluada = new ReportParameter("NmCargo", NmCargoEvaluada.ToString());
ReportParameter pNmPersonaEvaluada = new ReportParameter("NmPersona", NmPersonaEvaluada.ToString());
rptviewer.ServerReport.SetParameters(new ReportParameter[] { pNmEmpresa,pNmCiclo,pNmCargoEvaluada,pNmPersonaEvaluada });
rptviewer.ShowParameterPrompts = false;
}
No comments:
Post a Comment