none
Load embedded report from another assembly RRS feed

  • Question

  •  

    I have an web application, Investment.WebUI.

    All of my reports are in Investment.Reports assembly as an embedded resource.

    How can i get those reports in Investment.WebUI

     

    Something like

     

    m_UnderlayingReport.ReportEmbeddedResource = "embeddedReport".

     

    i tried m_UnderlayingReport.ReportEmbeddedResource = "Investment.Reports.MoneyReport.rdlc" and it isn't working. Do I need to set anything else in my code except that line in order for embedded reports to work?

     

    Thnx

    Thursday, March 20, 2008 2:04 PM

Answers

  • I wanted to do the same thing, but apparently the resource must be in the calling assembly to use the ReportEmbeddedResource property. However, a workaround is to manually open the resource from the other assembly as a stream and use Report.LocalReport.LoadReportDefinition(reportStream).

     

    Go here for more info:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=236308&SiteID=1

     

    Another method maybe to try is to send the LocalReport to the Assembly containing the report and have it loaded there.

    Thursday, March 20, 2008 5:46 PM