Chorn Sokun’s Weblog

try { divide and conquer; } catch { keep it simple!; } finally { nothing is impossible; }

Loading *.rdlc stored outside the assembly

leave a comment »

I am back with the ReportViewer control shipped in .NET 2.0
What is the problem again? well it not much I just want to share about how I can load the *.rdlc file stored outside the Assembly.

Okay, let say my application have the following structure:

By store the report separate from the BillionDollarApp.exe (not embed *.rdlc as an assembly resource) it allow me to make change to the report without having to recompile my app.

To load the report file:

string stRDLCFileName = "Report1.rdlc";
this.reportViewer1.LocalReport.ReportPath = "Reports\\" + stRDLCFileName;
this.reportViewer1.RefreshReport();

Until then it all for now ;)

Written by Chorn Sokun

October 17, 2006 at 3:06 pm

Leave a Reply