on 2019 Nov 26 6:26 PM
I have a report grouped by PO. Within the group there are various order lines each with a Status - C for Complete, P or W if not yet Complete. However I just want to see whether the whole PO is complete - if any of the order lines within it are P or W, I want it to say "Incomplete" at the Summary Group level, and then work out how many POs are completely complete, and how many still have some outstanding lines.
Request clarification before answering.
This is possible but it's going to take a couple of formulas. Something like this:
{@IncompleteForCount}
if {MyTable.status field} = 'P' or {MyTable.status field} = 'W' then 1 else 0
{@CompleteForCount}
if {MyTable.statusField} = 'C' then 1 else 0
{@IsComplete}
if sum({@IncompleteForCount}, {MyTable.PO Field}) > 0 then 'Incomplete' else 'Complete'
{@CompleteForTotal}
WhilePrintingRecords;
NumberVar completeCount;
if OnFirstRecord then completeCount := 0;
if {@IsComplete} = 'Complete' then
completeCount := completeCount + 1;
""
{@IncompleteForTotal}
WhilePrintingRecords;
NumberVar incompleteCount;
if OnFirstRecord then incompleteCount := 0;
if {@IsComplete} = 'Incomplete' then
incompleteCount = incompleteCount + 1;
{@ShowCompleteTotal}
WhilePrintingRecords;
NumberVar completeCount
{@ShowIncompleteTotal}
WhilePrintingRecords;
NumberVar incompleteCount
You'll use {@IsComplete} to get the Complete vs. Incomplete labels in either the PO group header or footer. You don't need to put the formulas above that anywhere - the Sum() will make them run automatically .
Put both {@CompleteForTotal} and {@IncompleteForTotal} in the PO group footer - neither will actually display anything but they need to be there for the calculation to happen.
Put the two "Show" formulas in the report footer to get the total counts.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.