GARANTIR DESCONTO

Fórum Rave Sequencia ininterrupta de reports #333038

12/11/2006

0

Tenho uma serie de reports sobre uma mesma tabela onde querys sucessivamente geram diferentes dados e parametros.

Visualizo ou imprimo um por um sem problema.A questão é que neccessito que um comando mande imprimir todos em sequencia sem apresentar caixa de set up options.Isto é: O usuário manda imprimir toda sequencia com um clic se nova interferencia.

Como?

Agradeço qualquer informação.


Rm

Rm

Responder

Posts

15/11/2006

Rm

Peguei no site da nevrona no link tips&trics.Não testei ainda

Tip #41 - Multiple Reports in Single Print Job

--------------------------------------------------------------------------------



Category
Rave - General


Question

I have a number of reports that I want to send to the printer without creating a separate print jobs for each report. How would I do this?

Solution

Normally, you would call RvProject1.ExecuteReport(´ReportName´) for each report that you want printed. This does, however, create a separate print jobs for each report that is printed. Often it is desirable to send multiple print jobs to the printer as a single print job, preventing other print jobs from getting mixed in with the report from others printing over the network. This can be done using a RvSystem component in combination with the RvProject component.
Simply drop down a RvSystem component along with your RvProject component. Set the engine property of the RvProject component to point to the RvSystem component. Then define an OnPrint event for the RvSystem component. In the OnPrint event you would write code similar to this:

Delphi Example:

with Sender as TBaseReport do begin
RvProject1.ExecuteReport(´Report1´);
NewPage;
RvProject1.ExecuteReport(´Report2´);
NewPage;
RvProject1.ExecuteReport(´Report3´);
end; { with }
C++Builder Example:

TBaseReport* bp = dynamic_cast<TBaseReport*>(Sender);

RvProject1->ExecuteReport(´Report1´);
bp->NewPage();
RvProject1->ExecuteReport(´Report2´);
bp->NewPage();
RvProject1->ExecuteReport(´Report3´);
Then when you want to print your report, you would call RvSystem1.Execute, if you are using Delphi or RvSystem1->Execute(), if you are using BCB. This method has the added advantage of allowing you to preview the entire report at one time.


One thing you should be aware of is that if you are printing reports, some in landscape and some in portrait, the first page will always be that as set in the RvSystem component, since by the time it gets to the OnPrint event the page orientation has already been set. To solve this problem you will need to set the orientation of the RvSystem component to be that of the first page of the first report being generated.

Rave 4 Users: In Rave Reports version 4, the TRvSystem component was named TReportSystem and the TRvProject component was named TRaveProject.

Warning

Make sure that the RvSystem assigned to the RvProject Engine property has its Units property set to inches. To find this property select the RvSystem component and open the SystemPrinter property group. There, check that the Units property is set to unInch. The reason for this is that Rave internally saves all of your report design dimensions in inches.
Tip created by Nevrona Designs - Email : support@nevrona.com - Web : http://www.nevrona.com

Date Created: 9/17/2001 10:40:58 AM - Date Last Updated: 10/10/2001 5:14:00 AM


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar