Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help printing a PDF as part of a Crystal Report

Status
Not open for further replies.

klgrube

Programmer
May 29, 2002
28
US
Hi!

Here's my problem: Each week, my company receives two emailed files from UPS. One is a PDF, usually two pages, that is an overview of their weekly invoice. Then, we receive a flat file containing the details of the shipments included on the invoice. I load that data up into SQL and then print out a Crystal Report that emulates a regular, detailed UPS invoice.

The problem is that our AP clerk has to print two files in order to see the complete UPS invoice. That's silly! I can't see any reason why I shouldn't be able to put these together into a single file. I just can't figure it out.

I thought I could store the PDF that UPS sends us in a SQL Binary field and then just include that field on my detailed invoice report, perhaps as the Report Header. The first problem is that I just can't figure out how to that that PDF into a field in SQL. I'm just not sure how to code that. And, I've tried just creating a hyperlink on the report, which doesn't work because someone has to click on it.

My theory is that I should be able to include the PDF at the top of the report somehow, even though it's two pages. Perhaps all I need is some guidance as to how, within VB code or through SQL Server DTS, to store the PDF file into a field in SQL. That's assuming, though, that I could access that field and print it from within CR 10.

Again, all I want to do is print out a two-page PDF document at the top of a Crystal Report. My theory is that it shouldn't be this hard! If anyone knows of an easier way to do this, please let me know. Any guidance would be greatly appreciated.

Thanks,
Karen Grube
klgrube@yahoo.com
 
Goto one of the SQL forums andI am sure someone can tell you how to store the .pdf in the SQL blob field.

Then in crystal, I am pretty sure -- although we would need to test this -- that you can simply place the blob field on the crystal report. I have done with before, but never with a .pdf file and never with anything more than one page.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Another option is to export the Crystal report to a pdf and then merge the 2 pdf files. There are several utilities that allow you to merge pdf files.

At least one of the 3rd-party Crystal Report Managers listed at: allows you to automate the whole process in the sense that you would be able to create (and schedule if you wish) a batch file that would a) trigger the processing and exporting of the detail report into a pdf file, b) merge the two pdf files, and c) print and/or email the resulting pdf file.

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Hi!

Thanks for all your answers! I'd thought about just merging the output to a single PDF, but that doesn't help when someone wants to just open up the report itself. I really want the PDF to display correctly on the first two pages and be able to be exported from that to a single PDF without a hassle.

So, I'm still wondering if anyone has ever tried including a PDF from a SQL table on a report. Has anyone ever tried that with success? I'd really love to hear about it if you have. In the meantime, I'll post this to the SQL forum as well.

Thanks!
Karen
Karen
 
You might be able to include a PDF file using an OLE object, but as the document is multiple pages, I doubt it will display or print correctly.

It would be better to automate the Report to output to PDf and then merge the PDF documents.

If the documents were HTML or RTF you could use our cViewTEXT utility, but PDF is a print format, so can't be used in that way.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top