Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Quick preport filter

132 views
Skip to first unread message

James Peterson

unread,
Nov 14, 2001, 2:57:36 PM11/14/01
to
I am working with Quick Report export filters and i am not sure I
understand how it works. I read the How To's, FAQ, and help files and
they all show the following example.

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.
--


Antonio Felix

unread,
Nov 15, 2001, 11:48:38 AM11/15/01
to

This code executes the Export Filters in a Report Preview on
a 'Save' Button Click:

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

Girish Patil

unread,
Nov 16, 2001, 9:10:04 AM11/16/01
to
James Peterson <jpet...@romanmealmilling.com> wrote in message
news:3BF2CCB0...@romanmealmilling.com...

> I am working with Quick Report export filters and i am not sure I
> understand how it works. I read the How To's, FAQ, and help files and
...

> 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!


James Peterson

unread,
Nov 16, 2001, 2:55:24 PM11/16/01
to
ok, this is dumb but where can I get QRExport.hpp? I don't seem to have that
file anywhere on my computer.

Girish Patil wrote:

--

Girish Patil

unread,
Nov 17, 2001, 1:18:04 AM11/17/01
to
You should find it in ..\CBuilder5\Include\Vcl.
Do you see a TQRTextFilter component on the QReport page of the component
palette? Drop it on a form and compile the application. Does it compile?

James Peterson <jpet...@romanmealmilling.com> wrote in message

news:3BF56F2C...@romanmealmilling.com...

James Peterson

unread,
Nov 19, 2001, 9:05:56 AM11/19/01
to
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

unread,
Nov 19, 2001, 11:17:52 AM11/19/01
to
Please check http://www.qusoft.com. You'll probably need to install QR
again.

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.

0 new messages