BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

QuickReport problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Anders
Guest





PostPosted: Mon Jan 26, 2004 12:18 pm    Post subject: QuickReport problem Reply with 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


Back to top
Antonio Felix
Guest





PostPosted: Mon Jan 26, 2004 12:24 pm    Post subject: Re: QuickReport problem Reply with quote




"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.