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

Programaticly Export Report To File: OLE IDispatch exception code 0

Status
Not open for further replies.

skuhlman

Programmer
Jun 10, 2002
260
US
I'm using Microsoft Visual Foxpro 7 and Crystal Reports 9

I've got the crystal viewer popping up with the report and am able to use the viewer's controls to "save as..." an excel or pdf or text or... file and it works great.

Now I'm trying to program the ability to export the file directly from my VFP form without having the viewer pop up. The pertinant code is:
Code:
     g_oCRRep.ExportOptions.DestinationType = 1
     g_oCRRep.ExportOptions.FormatType = 29
     g_oCRRep.ExportOptions.DiskFileName = "c:\junk\AutoSave.XLS"
     g_oCRRep.DiscardSavedData()
     g_oCRRep.Export(.F.)
Setting the porperties and firing the DiscardSavedData method all works fine. When the EXPORT method fires, instead of getting my output file, I get the following error message:
OLE IDispatch exception code 0 from Crystal Reports ActiveX
Designer: Not supported
Details Cannot obtain error message from server...

Can anyone help?!?!

Thanks, Stacey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top