Discussion:
Changing Rave Text Within Delphi
(too old to reply)
Randy Adanza
2007-03-29 09:17:13 UTC
Permalink
Cheers,

I have several one page reports that I save as a PDF, Im saving them in a
sequential manner in a temp folder (1.pdf, 2.pdf etc..) and then merge them
all
together in Delphi to form just one pdf file (report.pdf). Which reports
get printed
depends on the user.

However, since those reports are just single page, their page number reads
'1 of 1',
starting from the first page up to the last page. Can I change this
programmatically
within Delphi?? If so how?

Im using BDS2005 Ent, Rave BE 6.0.1

tia
Randy.
Trevor Keegan
2007-03-30 04:57:01 UTC
Permalink
Hi,

If you creating the pages as separate print jobs and then merging them
together, then you cannot do what you want. If you are printing them
together in a single print job then look at
http://www.nevrona.com/Default.aspx?tabid=120

Regards
Trevor Keegan
Randy Adanza
2007-03-30 07:37:27 UTC
Permalink
Thanks for the help Trevor. Actually I was able to make
a work around.

First I made a new driverDataView and I made a sql text as follows:
Select CurrentPage = 1, TotalPages = 5

And then I dropped a datatext on the page and set its DataField to
'Page '+DriverDataView1.currentpage + ' of ' + DriverDataView1.totalpage

And then in Delphi I first Determine how many pages the report will generate
by doing a loop:

aPageIncrementCount := 0;
for aCnt := 0 to RecCount - 1 do
case TPrintType ( aselection ) of
eptAll :
begin
Inc ( aPageIncrementCount,1 ) ;
//Insert Code Below
Inc ( aPageIncrementCount,1 ) ;
//Insert Code Below
Inc ( aPageIncrementCount,1 ) ;
//Insert Code Below
end ;
eptInfo :
begin
Inc ( aPageIncrementCount ) ;
//Insert Code Below
end;
eptCV :
begin
Inc ( aPageIncrementCount ) ;
//Insert Code Below
end;
eptDocuments :
begin
Inc ( aPageIncrementCount ) ;
//Insert Code Below
end;
end ;

aTotalPages := aPageIncrementCount ;
aPageIncrementCount := 0;

And then I make a similar loop as above and placed this code in each of the
case statement condition

avar := Format ('select CurrentPage = %d, TotalPages = %d ',
[aPageIncrementCount , aTotalPages ]);
dvDriver := TRaveDriverDataView ( ProjMan.FindRaveComponent
( DriverDataView1, nil ) ) ;
dvDriver.Close ;
dvDriver.Query := avar;
ExecuteReport ( Report ) ; //Report here refers to different report
page


I know that it is not elegant to look at, but it works for me.
Again thanks for the help. And thanks for the link
as well, I will definitely check it out.

Randy.
Post by Trevor Keegan
Hi,
If you creating the pages as separate print jobs and then merging them
together, then you cannot do what you want. If you are printing them
together in a single print job then look at
http://www.nevrona.com/Default.aspx?tabid=120
Regards
Trevor Keegan
Trevor Keegan
2007-04-01 14:04:38 UTC
Permalink
Hello Randy,

I do not know the details of your application/report, but something to think
about.....If you are not fixing the page size, you might run into trouble if
the user changes the type of paper.

Regards
Trevor Keegan
Randy Adanza
2007-04-12 03:02:10 UTC
Permalink
thanks will keep that in mind.
Post by Trevor Keegan
Hello Randy,
I do not know the details of your application/report, but something to
think about.....If you are not fixing the page size, you might run into
trouble if the user changes the type of paper.
Regards
Trevor Keegan
Loading...