Last post Sep 19, 2011 05:22 PM by N_EvilScott
Sep 19, 2011 05:56 AM|arkiboys|LINK
I have created a ssrs report and managed to deploy it.
From the initernet explorer I can browse to the report.
I can select parameters and run the report.
Now I would like to view this report from windows form in vs 2010.
When I want to run view this report by running the winform code, the reportviwere comes up but there is a message which says:
The source of the report definition has not been specified.
How do I solve this please?
This is the code to view the report:
this.reportViewer1.ServerReport.ReportServerUrl = new Uri(@"http://" + Common.MachineName + ":1234/ReportServer");
this.reportViewer1.ServerReport.ReportPath = @"/Reports/" + _strReportName;
Microsoft.Reporting.WinForms.ReportParameter RptParameter = new Microsoft.Reporting.WinForms.ReportParameter;
RptParameter = new Microsoft.Reporting.WinForms.ReportParameter("RequestID", "2");
Sep 19, 2011 05:22 PM|N_EvilScott|LINK
Windows Forms uses the "ReportEmbeddedResource" instead of ReportPath
Also you need to make sure you add the assembly name before it generally as well if its a resource in your win forms application. So if you have a project called MyProject then it would be like...
ReportEmbeddedResource = "MyProject." + _strReportName;