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!

Suppressing group hdr/ftr except on 1st occurance

Status
Not open for further replies.

DiegoSedai

Technical User
Feb 3, 2003
8
CA
I need to create a receipt format which includes a group to summarize only the latest receipt info on the customer record. All previous receipts are to be sub-totalled together into the report footer section.

The customer could have multiple receipts on a day, each with multiple transactions, so I can't group by receipt date.

I have a section grouping on receipt number. The detail section for the receipt (individual line items) have been suppressed.

Then I have a grand total section in the report footer which totals all receipts to date.

But I still get a group for each receipt when all I want is the latest receipt and then suppress all others as they will be included in the grand total anyway.

Any ideas?
 
i am assuming you have everything grouped by customer number... have you tried conditional formatting like

(previous{customer_ID} = {customer_ID}) ?

if i am thinking it through correctly, it would suppress every group header that is for the same customer ID as the receipt before it... [ponder]

i never promise good results as i am learning more than helping here; but it MAY work...

ShannonLea
Computer Coordinator 4 Surgical Services
Athens Ga
[noevil]
 
create a shared variable and initialize it to false in the report header. In the group footer set this to true (so it will get through the header and footer once as false). Then in the suppression formula x->2 for the header and footer, add the variable. You will get both once and then nevermore :)

Lisa
 
It sounds like you want the most recent receipt within the most recent date to display in the CustomerID header.

1-Create groups as follows: Group1 = CustomerID,
Group 2 = {Datetime}-in descending order, and Group3 = {ReceiptNo}.

2-Suppress Group2--this group is not for display, it's just to order your receipts by time instead of receipt number.

3-Copy the summary and other fields in the group3 (Receipts) header and paste into the Group1 header.

4-Suppress Group 3 (Receipts) header and footer.

5-Calculate your report totals based on the group3 summaries or on report details, as appropriate.

-LB
 
Thanks so much for the input!

I tried the 1st suggestion before I saw the others and although all look like they'd work, the previous/next option does the trick.

One group based on receipt id - descending sort (combination of datetimeseqno)

In the GH1 suppress formula:
previous({receipt_id}) <> ({receipt_id);

In the GF1 suppress formula:
previous({receipt_id}) = ({receipt_id);

This prints only the latest receipt summaries in the group section and properly totals all other receipts into the grand totals within the report footer.

Thanks a bunch!![thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top