Discussion:
Access to the CurrentPage / TotalPages within an event
(too old to reply)
Anders Balslev
2007-05-10 06:06:58 UTC
Permalink
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?
Eldon Lewis
2007-05-10 23:02:43 UTC
Permalink
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
Post by Anders Balslev
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
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?
Loading...