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

How to reset de pages by group?

Status
Not open for further replies.

vxxv

Programmer
Jan 23, 2004
32
PT
Hi,

I have a first group of Work Orders and a second group of Work Requests, so that it will show me how many work requests one work order has. Meaning that i could have one work request per work order or ten work requests just for one work order.
What i intend to do, and don't know how, is to reset the number of pages per work orders.
A better explanation. My report has 10 pages. In the report i have tree work orders groups. The first work order has two work requests, the second work order has five work requests and the third work order has three work requests.
In the first work order i want to put something like this "1st Work Request of 2", and increment the first number until the work requests belongs to that work order.
In the second work order i want to put something like this "1st Work Request of 5", and increment the first number until the work requests belongs to that work order, so that the last work request has the text "5th Work Request of 5".
I hope that this is understandable.

If somebody will be able to help me, please send a response.

My regards.

Jaime
 
First create a running total {#grpcnt} using the running total editor. Select {table.workrequest}, distinctcount, evaluate for each record, reset on change of group (work order). Then create a formula:

"Work Request " +totext({#grpcnt},0,"") +" of " +
totext(distinctcount({table.workrequest}, {table.workorder}),0,"")

Place this in the group header or footer for work requests. I wouldn't use the syntax that calls for "st","nd","rd","th" appended to numbers, as it would unnecessarily complicate the formula.

-LB
 
Thanks a lot.
It worked very well.
Any help, let me know.

Best regards,

Jaime.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top