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!

OnFirstRecord problems - Desperate 1

Status
Not open for further replies.

deepsheep

Programmer
Sep 13, 2002
154
CA
In on report I've created, the onfirstrecord does not consistanly work. It seems to work on data that is older than a few days and does not work on newer data. I'm using it like this :
If onfirstrecord then
(
//prime some vairables
s:={some DB field}
)

I'm using a stored procdure to return data between two dates for crystal reports to process.

I've tried making a field that will print only with onfirstrecord, and nothing happens; I've done a count to makes sure that the first record was being printed and processed, and it was.

One thing I have discovered is that onfirstrecord and onlastrecord do not seem to work when buried in a complex if..then..else if..then..else statemet. If they are near the beginning, they seem to work fine.

If you have any suggestions, or have even seen anything like this before, it would all be appreiciated.

Thanks in advance!!
 
try prefacing your formula with the statement "While Printing Records;", and as you have discovered, put the OnFirstRecord or "OnLastRecord" tests first. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
It seemed to have fixed its self in the morning, but to prevent further issues, the first thing i'm doing now is to assign the values of onfirstrecord and onlast record to variables. I then use the variables.

Thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top