Board index » delphi » QuickReport problem

QuickReport problem


2003-08-15 08:41:56 AM
delphi94
Hi all!
The TQuickReport do not has a paper size that I want, so I set a custome
paper size.
It worked in preview, but I found it printed in A4 paper size format when I
printed out.
What's wrong did I do?
Thank you!
Lee
 
 

Re:QuickReport problem

When I print a QuickReport I want to have the printer dialog up first to
choose which printer I am going to use. to du this I use
Form1->QuickRep1->PrinterSetup();
and then to print:
Form1->QuickRep1->Print();
but if I press cancel in the PrinterSetup window I don't want to print out.
The PrinterSetup does not return a value, so how can I find out if the user
has pressed cancel in the PrinterSetup? Is it another way to do it?
Anders
 

Re:QuickReport problem

"Anders" <XXXX@XXXXX.COM>writes:
Quote
When I print a QuickReport I want to have the printer dialog up first to
choose which printer I am going to use. to du this I use

Form1->QuickRep1->PrinterSetup();

and then to print:

Form1->QuickRep1->Print();

but if I press cancel in the PrinterSetup window I don't want to print out.
The PrinterSetup does not return a value, so how can I find out if the user
has pressed cancel in the PrinterSetup? Is it another way to do it?

Anders


Hi Anders
Take a look at QuickRep1->Tag, it returns zero if the
PrinterSetup() have not been canceled.
Ex:
try {
Rep->PrinterSetup();
if ( Rep->Tag == 0 )
Rep->Print();
else
RepAfterPrint(NULL);
}
catch( Exception &E ) {
Msg( "Cannot Print the Report!", E );
}
HTH
Antonio
 

Re:QuickReport problem

I would like to print my QuickReports to PDF instead of printer, and I don't
want to show the box where I can select the filename. The filename will
always be "c:\pdf\Active.pdf". How can I do that without buying any
components? I have got the Adobe PDF writer.
Anders
 

Re:QuickReport problem

Anders writes:
Quote
I would like to print my QuickReports to PDF instead of printer, and I
don't want to show the box where I can select the filename. The filename
will always be "c:\pdf\Active.pdf". How can I do that without buying any
components? I have got the Adobe PDF writer.

Anders
If you have a linux box anywhare on your network, you can simply set up a
samba print queue which accepts print output and automatically creates PDF
files. To do this you use ghostscript; google for "ghostscript".
I have found this useful for some time to provide customers with viewable
reports over the internet. I set up a directory accessible over the
internet via password and set up my PDF print queue to this directory so
that I can simply print from quick report to the PDF printer and
immediately the output is ready for viewing.