[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Export Multiple Reports as single PDF

Posted on 2006-11-20
13
Medium Priority
?
1,661 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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 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