SSRS ReportViewer problems with XML embedded data source

前端 未结 3 811
北荒
北荒 2021-01-26 03:41

I have C# (WPF) application where I want to display a SSRS report in the ReportViewer control. The local report file has XML datasource embedded in it. The report is displayed c

3条回答
  •  野的像风
    2021-01-26 03:55

    The answer to my question can also be found here When to use RDLC over RDL reports? and here http://www.gotreportviewer.com/. It's basically this:

    Unlike the Report Server the ReportViewer control does not connect to databases or execute queries. Also, in local mode the only export formats available are Excel, Word and PDF. (In remote mode all formats supported by the Report Server are available.) The ReportViewer control cannot be extended by adding custom renderers or custom report items.

    More information can be found here http://msdn.microsoft.com/en-us/library/ms252109(v=vs.80).aspx.

    The ReportViewer control, which processes .rdlc files, ignores the element of RDL. If a report definition contains a query, the control will not process it.

    and

    When converting a .rdl file to .rdlc format, you must manually replace the data source and query information in the report definition with data constructs provided in your application

    So you have to fetch the data explicitly and provided for the ReportViewer as a ReportDataSource having the exact same name as the dataset in the RDL file.

提交回复
热议问题