none
Report Viewer Export. RRS feed

  • Question

  • Hi,

    I am using the winform report viewer control  and i am displaying the report. RDLC files are placed in the ReportTemplate folder and its path is configured in the app.config file(Entry made as ReportPath =../ReportTemplate).

    First time report gets generated and application is able to find the rldc files in the ReportTemplate folder. When i exports the report to excel or pdf file (specified the export path as c:\Office\Data\ folder)

    When i again tried to generate the same report and its displaying me the error message saying unable to find the .rdlc file in the

    path : C:\Office\ReportTemplate. its changes the AppDomain.CurrentDomain.BaseDirectory to C:\Office\Data folder.

     

    Why is it  changing the AppDomain.CurrentDomain.BaseDirectory(BaseDirectory is only the readonly property and how is it able to change the BaseDirectory path)?

     

    How can i make my AppDomain.CurrentDomain.BaseDirectory always points to my Application path?

     

    Is it a bug in reportViewer?

    Wednesday, March 28, 2007 6:06 PM

Answers

  • This is a known issue with the viewer control.  You can work around it by setting the System.Environment.CurrentDirectory property prior to rendering a report.
    Thursday, March 29, 2007 1:29 AM
    Moderator

All replies