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!

Export a crystal report to Excel via Visual Foxpro

Status
Not open for further replies.

bntleahy

Programmer
May 30, 2003
5
US
Original Thread:
"I am trying to export a crystal report to Excel via Visual Foxpro. The maximum Excel formattypes allowed in the development documentation is version 5.0. My crystal reports export via Crystal runtime allows an export to excel 8.0 extended. How can I export to Excel 8.0 extended by running crystal reports via VFP code?"

I have followed the guidelines outlined in the article provided by Craig Bersten and am hitting the same exact error I had with my code:
OLE Error Code 0x80070057: The parameter is incorrect

It does not like 27 in the following line:
oExp.FormatType = 27 && crEFTExcel70

oExp.FormatType = 21 works fine but I need the higher version of Excel.

Hopefully you can help me with this. Thanks.
 
And I still have the same answer as the original thread. There are several articles on my web site that show how to integrate Crystal Reports with VFP, including exporting.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
The Craig Bernston article was very helpful. I also figured out that my DLL was old. Once this was updated with a later version, the code worked fine.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top