 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Anders Balslev Guest
|
Posted: Thu May 10, 2007 8:13 am Post subject: Access to the CurrentPage / TotalPages within an event |
|
|
Hi
BDS2006
RaveReport ver. 6.5.0
I can make a DataText field containing "Page N og M"
But I want - within an event - to get access to the actual pagenumber and
the total pages of the report
Assume following Pseudo Code in the event handler:
function DataText5_OnGetText(Self: TRaveDataText; var Value: string);
begin
if Report1.CurrentPage < Report1.TotalPages then
begin
Value := 'We are not at the last page yet';
end else
begin
Value := 'This is the lasp page';
end;
end OnGetText;
This will not work, because the compiler calims about "CurrentPage"
Any suggestions? |
|
| Back to top |
|
 |
Eldon Lewis Guest
|
Posted: Fri May 11, 2007 4:02 am Post subject: Re: Access to the CurrentPage / TotalPages within an event |
|
|
Since Rave only makes one pass through the data the TotalPages is not an
actual value but a place holder in the ndr file. Then when the report is
finally completed this place holder is updated with the actual value.
That's why you can't use it in the way you are wanting to. However, there
is a tip and trick out on our web page that shows how to do different text
on each page of the report except the last one.
http://tinyurl.com/2exxcx
Eldon Lewis
Nevrona Designs
"Anders Balslev" <itq (AT) business (DOT) tele.dk> wrote in message
news:4642b78a (AT) newsgroups (DOT) borland.com...
| Quote: | Hi
BDS2006
RaveReport ver. 6.5.0
I can make a DataText field containing "Page N og M"
But I want - within an event - to get access to the actual pagenumber and
the total pages of the report
Assume following Pseudo Code in the event handler:
function DataText5_OnGetText(Self: TRaveDataText; var Value: string);
begin
if Report1.CurrentPage < Report1.TotalPages then
begin
Value := 'We are not at the last page yet';
end else
begin
Value := 'This is the lasp page';
end;
end OnGetText;
This will not work, because the compiler calims about "CurrentPage"
Any suggestions?
|
|
|
| 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
|
|