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!

HOW to know the number of record on a subreport ?

Status
Not open for further replies.

infomik

Programmer
Jun 29, 2006
1
DZ
HOW to know the number of record on a subreport ?
i need to know the number of record on another subreport, if it's possible to do that.
Or if anybady know how to create a Variable and to modify their value when we read it "Like incrementing x=x+1".
tnx
and goodluck.
 
Goo dluck?

There are two approaches depending upon your requirements.

The function recordnumber will return the record as pulled by Crystal, though sortation can change this.

Another approach in by using variables.

If you want the record numbers starting in th main report you'd use a shared variable throughout, I'll show that and you can eliminate the main portion if need be.

main report header formula:

whileprintingrecords;
shared numbervar Pg:=0;

Now in any section subsequent to the report header use the following to display the record number:

whileprintingrecords;
shared numbervar Pg:pg+1;
"Page " Totext(Pg,0,"")

This would include any subreports or the main report to continuously increment.

You can eliminate the SHARED portion if you're simply doing this in the subreport.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top