Trish Fernandez
Trish Fernandez

Reputation: 61

Display number of rows on printout

If an Order contains 2 lines or more, my report sums it up and prints the whole quantity of items. It should print whichever line I have chosen:

WhilePrintingRecords;
NumberVar ItemCount := ItemCount + 1;
ToText(ItemCount, "0") & "/"
    & ToText(Count({rpt_PackingSlip.LabelQTY}, {rpt_PackingSlip.WorkOrderNo}),0,"")

For example, the order below contains a chair called Buzz, but the order contains 3 lines since each has different fabric. The total order quantity is 5:

enter image description here

If I print, the label count shows 1 out of 4 - which automatically sums the chair. If I select the first line, expected output is Buzz 1/2.. and 2/2. Currently output displays Buzz 1/4.. 2/4.. 3/4.. 4/4.. even if I just clicked 1st line. How can I achieve this result?

enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 33

Answers (1)

shawnt00
shawnt00

Reputation: 17915

You'll want to reset the counter on each group. Just create a second formula and drop it in the group header:

global numbervar ItemCount := 0;

Upvotes: 1

Related Questions