Print RDLC Report without showing ReportViewer Control

You can print an RDLC report programmatically by using LocalReport object and CreateStreamCallback callback function. Here is a complete Microsoft docs walkthrough which you may find useful: Walkthrough: Printing a Local Report without Preview To make it easier to use, I’ve created a Print extension method which you can easily use it this way: this.reportViewer1.LocalReport.Print(); … Read more

Setting the datasource for a Local Report – .NET & Report Viewer

You need to create a ReportDataSource, and set its Value property – e.g. DataTable and IEnumerables are supported sources As an example, and assuming that a method exists to return a DataSet, with a single DataTable matching the columns needed by your report: DataSet ds = SomeMethodToRetrieveDataSet(); // e.g. via DataAdapter // If your report … Read more

How to pass main report data source to subreport (JasperReports)?

You can pass datasource via the built-in REPORT_DATA_SOURCE parameter. The example: <subreport> <reportElement x=”261″ y=”25″ width=”200″ height=”100″/> <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + “subreport.jasper”]]></subreportExpression> </subreport> You can create new instance of datasource based on variable, parameter or field. The sample: <variable name=”HeadingsCollection” class=”java.util.Collection” calculation=”System”> <initialValueExpression><![CDATA[new java.util.ArrayList()]]></initialValueExpression> </variable> … <subreport> <reportElement x=”0″ y=”0″ width=”515″ height=”20″/> <subreportParameter name=”ReportTitle”> <subreportParameterExpression><![CDATA[$P{ReportTitle}]]></subreportParameterExpression> </subreportParameter> … Read more

Compare SQL Server Reporting Services to Crystal Reports [closed]

On the one-hand, Crystal Reports is a steaming pile of expensive and overhyped donkey poo, and on the other hand SSRS actually fulfils all the promises that CR marketing makes – and it’s free. My contempt for CR stems from many years of being obliged to use the horrible thing. There’s really no point in … Read more