PageDocument reference from Win Viewer

Posted by: mdynna on 17 July 2023, 6:11 am EST

    • Post Options:
    • Link

    Posted 17 July 2023, 6:11 am EST

    Our application will allow users to create custom RDL reports and save them into our application’s database. After creation, we want them just be able to select and run any of those reports as well as export them to PDF or Excel. I have it working fine to read the save report into the Win Viewer using LoadDocument with a MemoryStream, but now I want to Export the report to Excel. To render the Page report to excel I seem to need a reference to the PageReport or PageDocument object that was loaded into the Viewer. The Viewer’s Document property returns a SectionDocument (which is of course NULL in this case).

    Is there a way to retrieve a reference to the PageReport or PageDocument object loaded into the Viewer via LoadDocument? Or is there a different way I should be loading or exporting?

  • Posted 17 July 2023, 10:32 pm EST

    Hi Mark,

    You can load your report into a ‘PageReport’ object from your ‘MemoryStream’ using

    PageReport report = new PageReport(new StreamReader(stream));
    and use this object to export your report to Excel.

    Please find attached a sample implementing the same for your reference.

    Regards,

    Anand

    RdlReportExport.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels