I am new to reporting services. I added a reportviewer with parameters to display a graph. The graph doesn't load at all, but the parameters and toolbar show. When I ran the report on ReportManager, it ran fine, but when I click on View Report, it doesn't
display anything. Also, how would I run the report Dyamically without clicking the "View Report" button?
For the first question, Install Report viewer on the machine the application is hosted on, or in the machine from where the application is running, you will be able to see the report.
Second, to run the report without clicking on the View Report button, You need to give default values to all the parameters.
Way to set the default value for parameter :
- Open the report parameter, in that you will be able to see the available values and default values.
- Provide the default value as per your query. ( Else mention the same as in the available values ) but in the default value only value of the parameter will be considered.
dotNetUser33
0 Points
2 Posts
ReportViewer: Report is not loading/How to run a report without having to click on the View Repor...
May 10, 2012 08:30 PM|LINK
Hi,
I am new to reporting services. I added a reportviewer with parameters to display a graph. The graph doesn't load at all, but the parameters and toolbar show. When I ran the report on ReportManager, it ran fine, but when I click on View Report, it doesn't display anything. Also, how would I run the report Dyamically without clicking the "View Report" button?
Here is my code:
ReportViewer rptViewer = new ReportViewer();
rptViewer.ProcessingMode = ProcessingMode.Remote;
rptViewer.ServerReport.ReportServerUrl = new Uri(Convert.ToString(ConfigurationManager.AppSettings["ReportServerUrl"]));
rptViewer.ServerReport.ReportPath = "/Graph/Graph";
List<ReportParameter> parameters = new List<ReportParameter>();
parameters.Add(new ReportParameter("Status", "Test"));
parameters.Add(new ReportParameter("ID", "2"));
parameters.Add(new ReportParameter("testID", "1"));
parameters.Add(new ReportParameter("UserID", "userid"));
rptViewer.SizeToReportContent = true;
rptViewer.AsyncRendering = false;
rptViewer.ServerReport.SetParameters(parameters);
rptViewer.ServerReport.Refresh();
Please help. Thanks
Srikanth Kas...
Contributor
4289 Points
883 Posts
Re: ReportViewer: Report is not loading/How to run a report without having to click on the View R...
May 16, 2012 06:06 AM|LINK
For the first question, Install Report viewer on the machine the application is hosted on, or in the machine from where the application is running, you will be able to see the report.
Second, to run the report without clicking on the View Report button, You need to give default values to all the parameters.
Way to set the default value for parameter :
- Open the report parameter, in that you will be able to see the available values and default values.
- Provide the default value as per your query. ( Else mention the same as in the available values ) but in the default value only value of the parameter will be considered.
- save and run the report.
For your additional help : http://www.venkateswarlu.co.in/BI/ssrs/Default_Values_for_Parameters.aspx
Srikanth Kasturi
Please "Mark As Answer" if my post serves purpose.