Export to a PDF that allows for drill-down

Tuesday 30 November 2010 @ 5:25 am

Would you like to export your reports to PDF format and still allow users to have drill-down functionality? I just learned that you can.  Ido Millet of Millet software recently sent me a Sample PDF that was generated using Visual Cut and Crystal Reports. The PDF shows a 1 page summary and allows you to drill down on any one of 8 product categories to see the products within that category. Then you can drill down again on a single product to see the details for that product.  I am impressed by the fact that this was all contained within one PDF.  You can request a zip file that has the PDF and source files or you can watch a 5-minute video that gives an overview of the process.

So how does it work? Inside this single PDF file there is one main PDF document and many other embedded PDF documents. All of the embedded PDFs were at one point separate PDF files. Visual Cut can automatically generate all these individual PDFs and then automatically incorporated them into the master PDF file. It creates links in a specified clickable spot in the main PDF and these links point to the appropriate PDF.

Lets take a simple example and walk you through how it would work. Start with a report that lists 50 products. You want to allow the user to drill down on any one of the 50 items and see a full page of sales details for that product. Here are the steps:

1) Create a master report (A) that has your summary version – the list of 50 products.
2) Create another report (B) that has 50 pages of details, one page for each product.
3) Using Visual Cut burst report B into 50 individual PDF files.
4) In report A add a formula (following Ido’s example) that links each group to a PDF.
5) Create a batch file (again following Ido’s example) that exports report A to PDF.
6) Include in it the line that tells Visual Cut to embed the 50 individual PDFs.
7) Make this fully automated by adding a line to the beginning of the batch file to do step 3 so that  the 50 PDFs are refreshed before they are embedded.  The batch file will then embed those 50 PDFs into the main PDF generated from Report A.

Now you can run this batch file at any time and it will automatically create a PDF with drill-down capability.

A couple of things to keep in mind:

1) This is not limited to one level of drill-down. If you want to drill-down from B to a new report (C) you could burst another report to be the C level and data and put the corresponding formulas in each group in B. You can repeat this as many times as you want.

2) The drill-down is not limited to a subset of the data like true drill-down in Crystal.  It is more like having an on-demand subreport because the link can take you to just about anywhere.  But unlike true subreports there no limits on the number of levels.

3) You can drill-down to other file types, not just PDF files. For instance you can embed spreadsheets, images and other files within this PDF and have them appear as a drill-down.

If you have a project that could use PDFs like this, and you would like some help implementing it, give me a call.









Leave a Reply

Recrystallize Pro