Help with exporting reports to pdf
Hi,
I have reports for each customer. However, when I output the report it outputs to 1 pdf file for all customers. Is there a way to generate seperate files for each customer without having to drill down each customer and exporting one-by-one?
Thanks
Re: Help with exporting reports to pdf
I assume your running Crystal Reports? And if so what version? Are you using the CR Viewer control?
Re: Help with exporting reports to pdf
Im not using VB or anything. Ive just got CR 11 and usually I would just click File>Export, but that wont help me to do individual reports.
Re: Help with exporting reports to pdf
Havent used CR 11 yet but it sounds like it may be a report design issue? If you have all customers in the details section then you would want to change it to have it display a single customer per page or new page on change of detail. Then you can export a particular page which will contain a single customer.
Re: Help with exporting reports to pdf
Yes, I have that already. The problem is that I have over 70 customers and I cant manually print page ranges. Also, Each customer has different lengths of pages, so I would have to manually go through each one to print them.
Right now, when I click preview I get a list of all my group headings (customers) and I right click on 1 and click drill down for that particular customer. Doing this for each customer would take ages.
Re: Help with exporting reports to pdf
Sound like you may need to use VB and perform several exports, one per customer.
Re: Help with exporting reports to pdf
Ive never used VB with CR and its been a while since ive used VB at all. Could you please direct me to some guides or tutorials for something like this?
Re: Help with exporting reports to pdf
I believe there is something on http://www.businessobjects.com (CR's website under reporting). Also, searching our forums should also generate some good hits.
Re: Help with exporting reports to pdf
thanks for that, ill give it a go
Re: Help with exporting reports to pdf
Here you got some code from CHM called "CrysDev: A Developer's Guide to Integrating Crystal Reports"
LOCAL oCR AS CRAXDRT.Application
LOCAL oRpt AS CRAXDRT.Report
LOCAL oExport AS CRAXDRT.ExportOptions
oCR = CREATEOBJECT("CrystalRuntime.Application")
oRpt = oCR.OpenReport("C:\Program Files\Crystal Decisions" ;
+ "\Crystal Reports 9\Samples\En\Reports\General Business" ;
+ "\Financial Statement.RPT")
oExport = oRpt.ExportOptions()
oExport.DestinationType = 1 && Disk File
oExport.FormatType = 31 && PDF
oExport.PDFExportAllPages =.T.
oExport.DiskFileName = "D:\Temp\Financial Statement.PDF"
oRpt.Export(.F.)
Regards,
Tribo.
Re: Help with exporting reports to pdf
is that different to just exporting a report using crystals interface?
Re: Help with exporting reports to pdf
It wont solve the issue as your issue seems to be a report design issue but it can help just as I had posted about it. I also have an VB6/Crystal Report Ex. in my signature but its using the CR Viewer control. What else you can do is to programmatically set the selection formula to just one particular customer and then export the report, and repeat for each customer.
Re: Help with exporting reports to pdf
I found some sample vb projects on the business objects support site. There is one that lets you preview a report using the report viewer control. That works and the drill down works. Now I need to be able to export it to pdf. I found a sample on the site which does this, but it doesnt work. I am trying to combine the viewing part with exporting, but it just crashes when I try exporting. Im using Visual BAsic express 2005.
Heres an error Im getting in the crReportDocument.Export() line:
Method 'ISCREditableRTFExportFormatOptions_reserved5' on type 'CrystalDecisions.ReportAppServer.ReportDefModel.EditableRTFExportFormatOptionsClass' from assembly 'CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.