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

Record Count starting number

Status
Not open for further replies.

adoctor

Technical User
Oct 3, 2006
24
US
Hi,

I found a closed thread on this subject but I need a little more help.

I use CR11 and inserted RecordNumber into a Detail section in my report. It works just fine, but I understand it is a field that cannot be altered.

What I need to do is reset the starting number in the next group of reports I run starting at the next consecutive number. For instance, my first group of reports starts at 1 and ends at 200. When I run the next report, separate data, I want the starting record number to be 201.

I found this reply, but it doesn't tell me how to reset the starting number. Can anyone flush this out for me? I am not a programmer. Thank you!:

MrBillSC (Programmer)
16 Jan 07 16:10
RecordNumber is a Crystal Reports special field that can not be reset. You can create a formula to create your own record numbers as follows:
// formula @CntRegion - Place in detail section.
WhilePrintingRecords;
NumberVar CntRegion;
CntRegion:= CntRegion + 1

// formula @CntRegionReset - Place in group footer and suppress.
WhilePrintingRecords;
NumberVar CntRegion:= 0
 
It sounds like you are running one report multiple times or two different reports and you somehow want to be able to continue numbering across reports. I don't think this is possible unless you either built all reports into one container report and then passed the numbering via shared variables or you create one report that is grouped on the value that is now being used to distinguish different report runs instead of running separate reports.

I am unsure whether third-party viewers might be able to address this issue.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top