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

Crystal report

Status
Not open for further replies.

hep1058

Technical User
Feb 23, 2004
5
CA
newbie question.
I wish to run and export a crystal report (.rpt) file on disk file. I try to implement an exemple I saw on this forum, but I got this. (this exemple is for a doc, I wish to save as .rpt)

I do not seems to have the proper syntax.
Error I am receiving, "Invalid file name"

Thanks all.


option Explicit
Dim oCRApp
Dim oReport

Set oCRApp = CreateObject("crystal.CRPE.Application")
Set oReport = oCRApp.OpenReport("F:\creport\report.rpt")
oReport.ExportOptions.FormatType = 14
oReport.ExportOptions.DiskFileName "F:\report\Report.doc"
oReport.ExportOptions.DestinationType = 1
oReport.Export False


 
Typo on directory name ?
Set oReport = oCRApp.OpenReport("F:\[blue]c[/blue]report\report.rpt")
...
oReport.ExportOptions.DiskFileName "F:\report\Report.doc"

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I was wondering if someone could point me in the direction of the vbscript documentation for crystal reports.

Chad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top