This tech tip explains how to use PDF-eXPLODE with SQL Server Reporting Services. Printing a SQL Server Reporting Services (SSRS) report to PDF-eXPLODE differs from other reporting applications. There are several ways to render an SSRS report and using PDF-eXPLODE in each scenario needs to be discussed individually.
This Tech Tip is accompanied by an example VB.NET 2005 solution named PDF-eXPLODE SSRS Demo that you can download in a zip file. This example uses SQL Server 2005 Reporting Services and the AdventureWorks sample database the comes with SQL Server 2005. The example is provided “as-is” and is not covered by the PDF-eXPLODE End-User License Agreement.
The example solution contains four projects, each demonstrating a different method for rending a report and exploding it using PDF-eXPLODE. The report used is “Company Sales” and comes with SQL Server 2005. It has been modified to include a PDF-eXPLODE tag in the page header.
The first demo project displays a report in a web browser. The report is stored in the SSRS database and is called a server report.
If you click the printer button and print to the PDF-eXPLODE printer, it will not explode. This is because the printer button in the Reporting Services WebForm Viewer is implemented as an ActiveX control that renders each page of the report on the server in an image format (EMF). PDF-eXPLODE looks for the text comprising the tag but it cannot be found because the file contains a bitmap image rather than text.
To explode such a report, you must export the report to an Acrobat (PDF) file and then explode the PDF file. This may be done by right-clicking the PDF file in Windows Explorer and selecting “Explode PDF with PDF-eXPLODE” or by opening the PDF file in Adobe and printing to the PDF-eXPLODE printer.
The second demo project displays a report in the WinForm report viewer. This method of displaying a report would be used in “thick client” applications. The report is stored in the SSRS database and is called a server report.
To explode such a report, you may click the printer button and print to the PDF-eXPLODE printer.
The third demo project is similar to the second demo in that it displays a report in the WinForm report viewer. This method of displaying a report would be used in “thick client” applications. The report is stored in the file system as an rdl file (Company Sales.rdl) and is called a local report.
To explode such a report, you may click the printer button and print to the PDF-eXPLODE printer.
The fourth demo project shows how to explode a report programmatically with no user input required. The report is stored in the file system as an rdl file (Company Sales.rdl) and is called a local report. When the project is started, the report is automatically exported to a PDF and the PDF is exploded using a Windows shell command in the following format:
C:\Program Files\PDF-eXPLODE\PDF-eXPLODE.exe ‑PRINTFILE“%1” ‑UNINSTALL
The %1 is replaced by the pathname of the PDF file to be exploded. (Do not include a space after ‑PRINTFILE).
To run the example projects, follow these steps:
For more information, contact Info@PDF-eXPLODE-US.com .
Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.