Controlling export filename with Crystal Reports


I have some Crystal Reports in my VB6 app that pring via Crysal Reports. I have the export button enabled and I have the users saving the reports as html. Is there a way to automate the printing of the report to HTML? I'd like to be able to add a buttion where the user just presses it and it automtaically exports to HTML instead if the poor interface that appeares when you choose HTML from the file list.
LVL 1
bfeddishAsked:
Who is Participating?
 
superg65Commented:
Hi

I don't know if you are using the RDC or ActiveX version of Crytal Reports so here are two options to try

For the RDC version

report.ExportOptions.DestinationType = crEDTDiskFile
report.ExportOptions.DiskFileName = "C:\Path\MyFile.htm"
report.ExportOptions.FormatType = crEFTHTML32Standard  'or crEFTHTML40
report.Export (false)

For the ActiveX version

report.Destination =crptToFile
report.PrintFileName = "C:\Path\MyFile.htm"
reportPrintFileType = crptHTML32Std
report.PrintFile

Cheers
G

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.