Display .RDLC report embedded in a DLL file

前端 未结 3 1341
谎友^
谎友^ 2021-01-30 12:54

I have a report that is used by a windows service and a form application. So, I want to put embed the report in a DLL file that can be used by both.

The problem is that

3条回答
  •  情歌与酒
    2021-01-30 13:52

    Something like this should do it:

    Assembly assembly = Assembly.LoadFrom("Reports.dll");
    Stream stream = assembly.GetManifestResourceStream("Reports.MyReport.rdlc");
    reportViewer.LocalReport.LoadReportDefinition(stream);
    

提交回复
热议问题