MyReport.ExportToFilter(TQRASCIIExportFilter.Create(’REPORT.TXT’));
or
MyReport.ExportFilter :=
TQRAsciiExportFilter.Create(‘c:\report.txt’);
MyReport.Prepare;
MyReport.ExportFilter.Free;
Is there any examples out there that are written in BC++ that would help
me better understand the usage?
--
James Peterson
Network Admin
Roman Meal Milling Company, Inc.
--
void __fastcall TFrmList::SaveClick(TObject *Sender)
{
// SaveDialog
SaveRep->InitialDir = AppSql->Report;
SaveRep->Filter = QRExportFilterLibrary->SaveDialogFilterString;
TQRExportFilter *filtro;
if ( SaveRep->Execute() ) {
switch( SaveRep->FilterIndex ) {
case 1:
// Qrp Format
if ( SaveRep->FileName.Pos("." ) == 0 )
SaveRep->FileName = SaveRep->FileName + ".Qrp";
QRPrev->QRPrinter->Save( SaveRep->FileName );
break;
case 2:
// Txt Format
if ( SaveRep->FileName.Pos("." ) == 0 )
SaveRep->FileName = SaveRep->FileName + ".Txt";
filtro = new TQRAsciiExportFilter( SaveRep->FileName );
if ( filtro ) {
QRPrev->QRPrinter->ExportToFilter( filtro );
delete filtro;
}
break;
case 3:
// Csv Format
if ( SaveRep->FileName.Pos("." ) == 0 )
SaveRep->FileName = SaveRep->FileName + ".Csv";
filtro = new TQRCommaSeparatedFilter( SaveRep->FileName );
if ( filtro ) {
QRPrev->QRPrinter->ExportToFilter( filtro );
delete filtro;
}
break;
case 4:
// Html Format - Very poor one
if ( SaveRep->FileName.Pos("." ) == 0 )
SaveRep->FileName = SaveRep->FileName + ".Htm";
filtro = new TQRHTMLDocumentFilter( SaveRep->FileName );
if ( filtro ) {
QRPrev->QRPrinter->ExportToFilter( filtro );
delete filtro;
}
break;
}
}
}
HTH
Antonio
> Is there any examples out there that are written in BC++ that would help
> me better understand the usage?
Hi James,
Here's some help:
TQRAsciiExportFilter* AFilter = new TQRAsciiExportFilter("Test.txt");
QuickRep1->ExportToFilter(AFilter);
AFilter->Free();
You'll need to include the QRExport.hpp.
If you want to export to other formats you'll just need to replace
TQRAsciiExportFilter with the appropriate class and change the file
extension. Here are some others:
TQRCommaSeparatedFilter
TQRHTMLDocumentFilter
Now for a small plug that I thought would be relevant <g> PsQRFilters is a
suite of export filters for QuickReport with which you can export reports to
PDF, HTML, RTF, Excel, Text, JPEG, GIF, BMP and more! It comes with fairly
thick documentation that includes BC++ examples along with examples in
Delphi. Please take a look at it: www.pragnaan.com
--
Girish Patil
Pragnaan Software
www.pragnaan.com
Exporting Reports from C++Builder and Delphi!
Girish Patil wrote:
--
James Peterson <jpet...@romanmealmilling.com> wrote in message
news:3BF56F2C...@romanmealmilling.com...
Is there anyplace I can get that file?
James Peterson <jpet...@romanmealmilling.com> wrote in message
news:3BF911C4...@romanmealmilling.com...
> Nope its not in that Directory. That was the first place I looked, and I
don't
> see one there either
> which would explain why I am having so many problems getting this to work.
>
> Is there anyplace I can get that file?
>
> Girish Patil wrote:
>
> > You should find it in ..\CBuilder5\Include\Vcl.