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

Export Crystal Reports to Excel without Options window

Status
Not open for further replies.

vetaldj

Programmer
Apr 14, 2005
11
US
Hi all, I have a problem. I need to export report to excel in background using JavaScript but it always brings export option window (not that one where you select format etc but next one). What to do to hide this window?

Set objCRApp = CreateObject("CrystalRunTime.Application")
set objCRRpt = objCRApp.openreport( rptfile )
objCRRpt.ParameterFields(1).SetCurrentValue CDbl(rep_week)

With objCRRpt
With .exportoptions
.formattype = 29
.ExcelExportAllPages = true
.diskfilename = exportfile
.destinationtype = 1
.UseReportDateFormat = True
.UseReportNumberFormat = True
End With
.export(False)
RetValue = exportfile
End With

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top