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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in ExportAsPdf : "incorrect variable type"

Status
Not open for further replies.

srobiolle

IS-IT--Management
Mar 26, 2003
21
0
0
FR
Hello,

I have a Delphi program that uses OLE to automatically refresh and export to PDF BO reports.

In BO V5, everything was fine, the following code was exporting the WHOLE report to PDF :

BOApp := CreateOLEObject('BusinessObjects.Application.5');
BODoc := BoApp.Documents.Open('TEST.REP', FALSE, TRUE);
BODoc.ExportAsPDF ('C:\TEST.PDF');

Now, in BO V6, the following code
BOApp := CreateOLEObject('BusinessObjects.Application.6');
BODoc := BoApp.Documents.Open('TEST.REP', FALSE, TRUE);
BODoc.ExportAsPDF ('C:\TEST.PDF');

crashes at the third line (message = "incorrect variable type") , but
BODoc.Reports.Item(1).ExportAsPDF ('C:\TEST.PDF');

works great(but contains only the first report).

Does someone know how to export in PDF a whole report with Business Object V6 ?

Thanks,

Stéphane

 
Hi, Not sure if you've solved this yet but you need to use

BODoc.saveas("C:\Test.pdf")

hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top