Controlling export filename with Crystal Reports

Posted on 2005-05-13
Medium Priority
Last Modified: 2008-03-03

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.
Question by:bfeddish
1 Comment

Accepted Solution

superg65 earned 1000 total points
ID: 14054336

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



Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question