 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Randy Adanza Guest
|
Posted: Thu Mar 29, 2007 2:17 pm Post subject: Changing Rave Text Within Delphi |
|
|
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. |
|
| Back to top |
|
 |
Randy Adanza Guest
|
Posted: Fri Mar 30, 2007 8:13 am Post subject: Re: Changing Rave Text Within Delphi |
|
|
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.
"Trevor Keegan" <tkeegan (AT) ealink (DOT) com> wrote in message
news:460c98a4 (AT) newsgroups (DOT) borland.com...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Trevor Keegan Guest
|
Posted: Fri Mar 30, 2007 8:13 am Post subject: Re: Changing Rave Text Within Delphi |
|
|
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 |
|
| Back to top |
|
 |
Trevor Keegan Guest
|
Posted: Sun Apr 01, 2007 7:04 pm Post subject: Re: Changing Rave Text Within Delphi |
|
|
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 |
|
| Back to top |
|
 |
Randy Adanza Guest
|
Posted: Thu Apr 12, 2007 8:02 am Post subject: Re: Changing Rave Text Within Delphi |
|
|
thanks will keep that in mind.
"Trevor Keegan" <tkeegan (AT) ealink (DOT) com> wrote in message
news:460fbbfe (AT) newsgroups (DOT) borland.com...
| Quote: | 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
|
|
|
| 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
|
|