 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Wim Guest
|
Posted: Thu Sep 07, 2006 8:08 pm Post subject: Rave Reports (BaseReport.SelectPrinter) |
|
|
Hi,
I created some kind of automated printing using Rave Reports. I have the
code like this:
procedure tForm1.Button1(Sender: TObject);
begin
RvSystem1.execute;
end;
procedure tForm1.RvSystem1Print(Sender: TObject);
begin
with RvSystem1.Basereport do
begin
// Here comes the code for printing
end;
end;
This works perfect with the default printer, but I like to select the
printer automatically, because I want so sent one copy to the default
printer and a second copy to another printer in the network.
I already tried to use Basereport.Selectprinter(*printer*). But, depending
on where I put it, it didn't do anything or it created the error "Report
already printing".
Does anyone know a simple solution for this?
Thx, Wim. |
|
| Back to top |
|
 |
Bostontech Guest
|
Posted: Fri Sep 08, 2006 7:18 am Post subject: Re: Rave Reports (BaseReport.SelectPrinter) |
|
|
Try using the BeforePrint Event.
I use this event to change margins. You can probably use it to change
the printer. |
|
| Back to top |
|
 |
L. S. Lichtmann Guest
|
Posted: Sat Sep 09, 2006 4:52 am Post subject: Re: Rave Reports (BaseReport.SelectPrinter) |
|
|
Do the printer selection in the OnBeforePrint event
"Wim" <lostboy321 (AT) hotmail (DOT) com> wrote in message
news:450035db$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi,
I created some kind of automated printing using Rave Reports. I have the
code like this:
procedure tForm1.Button1(Sender: TObject);
begin
RvSystem1.execute;
end;
procedure tForm1.RvSystem1Print(Sender: TObject);
begin
with RvSystem1.Basereport do
begin
// Here comes the code for printing
end;
end;
This works perfect with the default printer, but I like to select the
printer automatically, because I want so sent one copy to the default
printer and a second copy to another printer in the network.
I already tried to use Basereport.Selectprinter(*printer*). But, depending
on where I put it, it didn't do anything or it created the error "Report
already printing".
Does anyone know a simple solution for this?
Thx, Wim.
|
|
|
| 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
|
|