Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Report Viewer
posted

I have a report viewer on the main window in a simple wpf application.  Then I created, in the same solution, a class library project  (MyReports.csproj) with a single report file (MyReport.igr).  When I add this report to the report viewer as follows:

 

 

 

 

 

 

 

<ig:XamReportViewer Name ="xamReportViewer1">

<ig:XamReportViewer.RenderSettings>

 

 

 

 

<ig:ClientRenderSettings DefinitionUri="/MyReports;component/MyReport.igr" />

 

 

 

 

</ig:XamReportViewer.RenderSettings>

 And then build the solution, and run it, I get this message:

could not find report definition /MyReports;component/MyReport.igr. 

 I have checked the report file properties and they are set to: Build Action = Resource and Copy to Output Directory=Copy Always.  Interesting, if I create a report in the same project as the viewer, it always runs fine.  When I create a report in a different project than the report viewer in the same solution, it never runs.

What am I doing wrong?

- Tom A.

Parents
No Data
Reply Children
No Data