Solved

Export Multiple Reports as single PDF

Posted on 2006-11-20
13
1,627 Views
Last Modified: 2012-05-05
Has anyone found a way of exporting multiple reports from Crystal XI to PDF from a report pack? I can export the currently highlighted report in the viewer, however it will only select the current report in the report pack, not the entire pack. I am using VB6 SP6 Crystal Reports XI SP2 with Octobers hot fix.

Pseudo code:

'Options
Dim Report1 as CRAXDRT.Report , Report2 as CRAXDRT.Report , Report3 as CRAXDRT.Report    
Dim MultiReport As New CrystalActiveXReportViewerLib11Ctl.ReportSourceRouter

Private sub Main()
Set Report1=CrxApplication.OpenReport("FirstReport.rpt") '4 pages
Set Report2=CrxApplication.OpenReport("SecondReport.rpt") 'Single page
Set Report3=CrxApplication.OpenReport("ThirdReport.rpt") 'Single page
    MultiReport.AddReport Report1
    MultiReport.AddReport Report2
    MultiReport.AddReport Report3
    CRViewer.ReportSource=MultiReport
    CRViewer.ViewReport

End Sub

Code works fine and the report pack can be viewed and printed as one, but it exports seperately.

Scott
0
Comment
Question by:Code_Mania
  • 4
  • 3
  • 3
  • +1
13 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 125 total points
ID: 17979697
Hi Scott,

To the best of my knowledge this isn't possible.  The export dll takes a single report as the inbound argument to produce the .xls file and there's no way to send in multiple reports to a single dll call.  The only way to get this result that I'm aware of is to embed the 2nd and 3rd reports as subreports inside the first one so they're all a single .rpt file.

frodoman
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 125 total points
ID: 17979893
Do all the reports export?

Here is a link to a tool to merge PDFs
http://www.verypdf.com/pdfpg/index.html

mlmcc
0
 

Author Comment

by:Code_Mania
ID: 17980429
Hi frodoman,

Unfortunately we cannot embed the reports as a sub report as the combination of reports changes per report pack.
0
 

Author Comment

by:Code_Mania
ID: 17980465
Hi Mlmcc

All the reports export correctly, but individually. Following on from pseudo code, report 1 is 4 pages long, report 2 is 1 page and report 3 is 2 pages. If I export from the viewer on page 4 I will get pages 1-4 e.g. the first report.

They print very nicely as a complete pack. Thanks for the suggestion of the third party tool, unfortunately we have a number of customer sites to cater for.
0
 
LVL 42

Expert Comment

by:frodoman
ID: 17980467
Scott,

I suspected that was the case - just explaining that this was the only workaround I know of.  If you can't embed as subreports then I guess the answer is that you really can't do it with Crystal at all.

You may want to explore a solution such as the one mlmcc linked to that will let you merge different pdf files together.  This is however, a completely outside-crystal solution.  You would have to do your exports and then externally merge the pdf documents.  The tool mlmcc talked about does support a command line interface so you should be able to invoke it from your application after you do the export and hopefully make the process invisible to your users.

frodoman
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 17987037
Consider also 3rd-party Crystal tools -- see list at:  http://www.kenhamady.com/bookmarks.html

My "Visual CUT" software provides the ability to export multiple reports to pdf files, merge the resulting pdf files into a single pdf, number the pages in the merged file, add a Table of Contents, protect the pdf file with a password as well as emailing or printing it.  You can trigger this functionality from within your application via a command line api.

- Ido
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 100

Expert Comment

by:mlmcc
ID: 17987748
Does your description include that information or did I miss it?  I looked at CUT and Visual CUT and didn't see that ability listed.

mlmcc
0
 
LVL 42

Expert Comment

by:frodoman
ID: 17987852
Visual CUT is a great piece of software, but if all you want is to merge PDF's there are much more affordable options out there.  CUT is a bit of overkill if this is all you want to do.

frodoman
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 17987924
Hi mlmcc,

The description on the web describes only some of it -- the user manual describes all of it....  

If you go to the 2-page Table of "Command Line Arguments" (towards the end of the user manual), some of the relevant arguments are:
PDF_TOC           Add Table of Contents to PDF File
  Note: the Table of Contents is created based on the pdf bookmarks, which are automatically added to the exported pdf file based on suppressed formulas within the Crystal report group headers.
PDF_PAGE_N      Add Page Numbers to PDF File
PDF_PROTECT      Encrypt/Protect a PDF File
PDF_MERGE       Merge PDF Files
PDF_PRINT        Print (stapled) a merged PDF File
PDF_PRINT_SPLIT          Print PDF file across paper trays
PDF_PRINT_SPLIT_TAG      Print PDF file across paper trays
PDF_Save_As                    Saves a PDF File to Image File(s)
PDF_Bookmarks_Open_Levels      Which Bookmarks Levels to Expand
PDF_FORM                            Fill Form Fields in a PDF File from info in the Crystal report (whole or burst)

Cheers,
- Ido
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 17988011
I agree with Frodoman.  If all you need to do is merge a few pdf files, Visual CUT is an overkill.  Of course, "needs" have an interesting tendency of expanding to match the available technology...  :o)

- Ido
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17988299
Thanks Ido.  I only looked at the web page and didn't open the manual.

mlmcc
0
 

Author Comment

by:Code_Mania
ID: 17994931
Thanks mlmcc/frodoman. I'll just have to wait for Business Objects to resolve this one!

Thanks Ido, unfortunately I can't use third party tools and the other exporting needs to remain seamless from the users perspective.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17996220
Glad i could help

mlmcc
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now