How do I dynamicaly create an SSRS Report?

后端 未结 3 1542
闹比i
闹比i 2021-01-26 23:01

Im trying to create a report in SSRS. The report calls a stored procedure for its data. I want to display the data in a table. But the thing is, the result from the stored proc

3条回答
  •  甜味超标
    2021-01-26 23:28

    You can use the Rdlobjectmodel provided by the Report designer to create and alter a report.

    You can reference the Microsoft.ReportingServices.Designer.Controls in to your project but that includes all the dependencies as well which is 20+ assembly or you can copy the following set of DLLs in a separate folder at your project root level and use it to reference the DLLs

     Microsoft.ReportingServices.QueryDesigners
     Microsoft.ReportingServices.Designer.Controls
     Microsoft.ReportingServices.RdlObjectModel
     Microsoft.ReportingServices.ReportDesign.Common
     Microsoft.ReportingServices.RichText
     Microsoft.ReportingServices.RPLObjectModel
    
    
      private Report LoadReportTemplate()
      {
            const string docPath = "template.rdl";//path for your template report
            using (var fs = new FileStream(docPath, FileMode.Open))
            {
                var report = Report.Load(fs);
                return report;
            }
      }
    

    Follow the link for Documentation

提交回复
热议问题