Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 10, 2012 02:36 AM by mathieuk
Member
5 Points
26 Posts
Dec 10, 2012 02:36 AM|LINK
Hi all,
Hope someone can help me with that.
I've got a reporting services report with some parameters (A and B)
We need to select A to populate B. It works fine in reporting services.
However when I want to use this report in an asp page using the report viewer object, I can't figure out how to do the cascading parameter in code.
I have tried a lot of ways but this is the latest code:
ReportViewer1.Visible =false;
Microsoft.Reporting.WebForms.ReportParameter[] param = new Microsoft.Reporting.WebForms.ReportParameter[1];
param[0] = new Microsoft.Reporting.WebForms.ReportParameter("A", HiddenField.Value, false);
ReportViewer1.ServerReport.SetParameters(param);
ReportViewer1.ServerReport.Refresh();
Microsoft.Reporting.WebForms.ReportParameter[] param2 = new Microsoft.Reporting.WebForms.ReportParameter[1];
param2[0] =new Microsoft.Reporting.WebForms.ReportParameter("B", HiddenField2.value,false);
ReportViewer1.ServerReport.SetParameters(param2);
ReportViewer1.Visible =true;
B doesn't get the value I'm trying to pass.
Does anyone have an idea?
Thanks
mathieuk
Member
5 Points
26 Posts
Cascading parameters with asp report viewer
Dec 10, 2012 02:36 AM|LINK
Hi all,
Hope someone can help me with that.
I've got a reporting services report with some parameters (A and B)
We need to select A to populate B. It works fine in reporting services.
However when I want to use this report in an asp page using the report viewer object, I can't figure out how to do the cascading parameter in code.
I have tried a lot of ways but this is the latest code:
ReportViewer1.Visible =false;
Microsoft.Reporting.WebForms.ReportParameter[] param = new Microsoft.Reporting.WebForms.ReportParameter[1];
param[0] = new Microsoft.Reporting.WebForms.ReportParameter("A", HiddenField.Value, false);
ReportViewer1.ServerReport.SetParameters(param);
ReportViewer1.ServerReport.Refresh();
Microsoft.Reporting.WebForms.ReportParameter[] param2 = new Microsoft.Reporting.WebForms.ReportParameter[1];
param2[0] =new Microsoft.Reporting.WebForms.ReportParameter("B", HiddenField2.value,false);
ReportViewer1.ServerReport.SetParameters(param2);
ReportViewer1.Visible =true;
B doesn't get the value I'm trying to pass.
Does anyone have an idea?
Thanks