 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Anders Guest
|
Posted: Mon Jan 26, 2004 12:18 pm Post subject: QuickReport problem |
|
|
When I print a QuickReport I want to have the printer dialog up first to
choose which printer I'm 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
|
|
| Back to top |
|
 |
Antonio Felix Guest
|
Posted: Mon Jan 26, 2004 12:24 pm Post subject: Re: QuickReport problem |
|
|
"Anders" <anders (AT) spn (DOT) no> wrote:
| Quote: | When I print a QuickReport I want to have the printer dialog up first to
choose which printer I'm 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
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|