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!

please help - exporting report to html from borland c++ builder

Status
Not open for further replies.

yoink

Programmer
Dec 2, 2001
15
AU
Hi guys,

I'm having huge troubles with an application that I've "inherited" from someone. All it does is open a crystal report and export it into a html file (well, that's what it's supposed to do). The code that I've got doesn't spit out any errors, but it doesn't actually export the file either. It doesn't produce any output at all. Here's what it looks like:

String strFileName = "c:\MyReport.rpt";
String strExportName = "c:\Output.html";
wchar_t *w_RptFile;
w_RptFile = StringToOleStr(strFileName);

//App1 is a TApp activex control from craxdrt.bpl
IReportPtr Rpt = App1->OpenReport(w_RptFile, 1);
Rpt->DiscardSavedData();

Rpt->ExportOptions->FormatType = crEFTHTML40;
Rpt->ExportOptions->DestinationType = crEDTDiskFile;

Rpt->ReadRecords();

w_RptFile = StringToOleStr(strExportName);
Rpt->ExportOptions->HTMLFileName = w_RptFile;

Rpt->Export(false);
Close();

Can anyone see what I might be missing? I've got all the required dlls as far as I can tell - when I open the report in crystal I am able to manually export it to html without any problems.

Regards,

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top