Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onlastrecord problem

Status
Not open for further replies.

nigamu

Programmer
Oct 28, 2002
2
IN
I have some problem in onlastrecord functionality.
In the database i have 32 records. But while displaying one record is getting cut(not displayed).
In report i am getting 32 records and report footer.
I have written following formula in new page before section.

if {?reccount}>((35*(TotalPageCount-1))-5) and {?reccount}<(35*(TotalPageCount-1)) then
OnLastRecord=true

reccount is the parameter field which gives total record count. If last page contains records greater then 30 but less than 35 then the 32nd record should be shifted in the second page where report footer is diaplayed.
if i hardcode the values in the if condition then it works properly i.e.

if {?reccount}>30 and {?reccount}<35 then
OnLastRecord=true

any help is appreciated
 
This may be due to report processing.

TotalPageNumber can not be calculated until report has been completely processed.

Try adding to the top of your formula.


Whileprintingrecords;

Regards

Ian


 
if i use Whileprintingrecords; at top then some part of report footer gets dissappeared

can any body help me
 
You do understand that the OnLastRecord statement will return TRUE only if you ARE on the last record in the database?

In which case, where does {?reccount} come into it?

You seem to be saying, &quot;If I have between 30 and 35 records on the last page, make sure the records after 32 get placed on a new page of their own&quot;

If this is true, your formula makes no sense. Steve Phillips, Crystal Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top