?
Solved

Export Multiple Reports as single PDF

Posted on 2006-11-20
13
Medium Priority
?
1,652 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
13 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 500 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 101

Assisted Solution

by:mlmcc
mlmcc earned 500 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
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

 

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 23

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
 
LVL 101

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 23

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 23

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 101

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 101

Expert Comment

by:mlmcc
ID: 17996220
Glad i could help

mlmcc
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

800 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