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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Count In Report Header

Status
Not open for further replies.

baycolor

MIS
Mar 23, 2005
148
US
Hi,

I'm using CR XI and a Teradata database.

I have a simple list report and I want to put a value in the report header that will display the number of detail rows in my report.

I created this formula:

WhileReadingRecords;
Local NumberVar opp_offr_cnt;
If OnFirstRecord then opp_offr_cnt := 0 else
opp_offr_cnt := opp_offr_cnt + 1

But I get the error This function (OnFirstRecord) cannot be used because it must be evaluated later.

If I remove the entire 3rd line and use:

WhileReadingRecords;
Local NumberVar opp_offr_cnt;
opp_offr_cnt := opp_offr_cnt + 1

the value in my report header is always 1.

I have played with WhilePrintingRecords but I can't seem to get a correct value.

I was about to try a subreport that did nothing but a count of the records my main report is selecting and then insert that but I have to believe there is a better way.

Any suggestions - total detail record count value has to be in my report header.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top