LocalReport.ReportEmbeddedResource not working RRS feed

  • Question

  • I have created a Web Project and in this web project I have created a page which contains a ReportViewer instance.

    When I do the following:

    ReportViewer1.LocalReport.ReportEmbeddedResource = "ClassLibrary1.Tasks.rdlc";

    It gives me the following error message:

        An error occurred during local report processing. The report definition for report 'ClassLibrary1.Tasks.rdlc' has not been specified

    (ClassLibrary1 is a separate DLL, but I have verified that it exists in the bin directory.)

    However the following works:

    Assembly assembly = typeof(ClassLibrary1.Product).Assembly;
    Stream stream = assembly.GetManifestResourceStream("ClassLibrary1.Tasks.rdlc");
    Is there any reason why ReportEmbeddedResource is not working working? Am I doing anything wrong?

    Thank you.

    Wednesday, October 13, 2010 5:36 PM

All replies

  • The way that ReportEmbeddedResource works is it looks in the same assembly that the ReportViewer is loaded in, if your reports are embedded is a seperate assembly then you will have to load the resource yourself and pass it to the control just as you did in your example.

    Matt M 
    This posting is provided "AS IS" with no warranties

    Wednesday, October 13, 2010 6:19 PM