Last post May 22, 2012 05:55 AM by sh1981
May 15, 2012 12:24 PM|sh1981|LINK
Can someone help me set the Chart Member Label (shown below) programatically from an aspx.cs page? ...
If I select it manually it shows other categories...
These categories are what I want to change programatically with an aspx page.
May 16, 2012 01:48 AM|Srikanth Kasturi|LINK
From your aspx page, pass a parameter (hidden) which will be this Location. For that Location label, directly assign the report parameter value.
Please note that the parameter should be hidden.
Way to pass the parameter to the report :
this.reportViewer.ServerReport.ReportPath = strReport;
RptParameters = new Microsoft.Reporting.WebForms.ReportParameter;
RptParameters = new Microsoft.Reporting.WebForms.ReportParameter(" <ParameterName>", "<ParameterValue>");
May 21, 2012 08:12 AM|sh1981|LINK
The solution did not work.
First of all its a local report.
I might be able to better explain by showing screenshots of what I'm trying to do
(Please click on screenshot to enlarge):
Here you can see in red circles what I want to change dynamically, it is an rdlc file:
Im using Choose() function to get value from ReportParameter1 to either choose Location or SubLocation like this:
=Choose(Parameters!ReportParameter1.Value, Fields!Location.Value, Fields!SubLocation.Value)
In report parameter I'm setting 2 values which are 1 and 2
Default value of the parameter is set to 1
At this point, without any call from aspx.cs codebehind, it should theoretically show fetch the value 1 as default value from the parameter...
But when I run it, this happens
Note that if I change =Choose(Parameters!ReportParameter1.Value, Fields!Location.Value, Fields!SubLocation.Value) to say =Choose(1, Fields!Location.Value, Fields!SubLocation.Value) then theoretically it should select Location.Value right? And it does...
So whats going on? Obviously the Choose() function is correct. All I want is to pass value 1 or value 2 into the choose() function.
Can anyone please help?
May 22, 2012 05:55 AM|sh1981|LINK