Using PDF-eXPLODE™ with Microsoft® SQL Server Reporting Services

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.


Demo1-WebForm

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.


Demo2-WinForm-ServerReport

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.


Demo3-WinForm-LocalReport

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.


Demo4-NoForm-LocalReport

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:

  1. Open the solution in Visual Studio 2005.
  2. In the DemoReport project, open the report layout and edit the tag to include your e-mail address for testing.
  3. Try each demo project by setting it to be the StartUp Project(right-click the project name in Solution Explorer and select Set as StartUp Project).
    • You may also need to change the database connection string, which assume Windows Authentication.
    • You may also need to change the SSRS report server URL, which is set to http://localhost/ReportServer.
  4. Click the Start Debugging button in the toolbar to run the demo.



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.



Download your free 45-day

trial version now

Top