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

Hi! I am trying to redo an old rep

Status
Not open for further replies.

LHG33

Technical User
Jan 16, 2002
24
US
Hi! I am trying to redo an old report. My report is grouped by endpoint (suppressed), lists account numbers and associated amounts in details A section, and has an item total and amount total at the botton of each page in a details B section. Using this format, I tried to make a count formula that would count my items per page, resetting when RunTable.DebCred = P and having the page break there also. This is an example of how it should look:

1234556 566.78
3432452 843.23
3489799 98.34


3 Items 1508.35 Item Total


My current item count formula is:

NumberVar PageCount;
If {RunTable.DebCred} = 'P' or
Previous({RunTable.Endpoint}) <> {RunTable.Endpoint}
then
PageCount := 0
else if
onfirstrecord then
PageCount:= 1
else
PageCount:= PageCount + 1;
PageCount;

I have tried nearly everything--including adding another group and trying reset and initialize formulas but to no avail (then again my programming knowledge is very small). Suggestions anyone?
 
Insert
---------------------------
WhilePrintingRecords;
---------------------------
as the first line in your formula.

As a side note, the whole thing could probably be done directly by incrementing a variable in the detail section, showing it in the page footer, and resetting it in the page header.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for responding, Ido! I put the whileprintingrecords in my formula and I tried putting my other formulas in the sections you recommended but it still isn't working right. For some reason, the report has a problem resetting every time it hits P in the DebCred field. If the report hits a &quot;P&quot; inside a group, the item count returned is 0 but then the next count is correct.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top