BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Access to the CurrentPage / TotalPages within an event

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (RaveReports)
View previous topic :: View next topic  
Author Message
Anders Balslev
Guest





PostPosted: Thu May 10, 2007 8:13 am    Post subject: Access to the CurrentPage / TotalPages within an event Reply with 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
Eldon Lewis
Guest





PostPosted: Fri May 11, 2007 4:02 am    Post subject: Re: Access to the CurrentPage / TotalPages within an event Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (RaveReports) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.