Question

I have to create a report based on a table storing broadcast email mailings history. Every time a mailing is sent, a row is entered into the Mailings table for each recipient - Mailings.ID, Mailings.CODE, Mailings.DATE, and Mailings.DELIVERED. Mailings can either be delivered or undelivered (T/F).

I need the report to show me those IDs whose previous five mailings (based on Mailings.DATE) were all undelivered (Mailings.DELIVERED = 0).

Having trouble figuring out how exactly to group/sort. Figure I have to group by Mailings.ID to start with - then sort within each group by Mailings.DATE descending. Then some sort of conditional formatting to display/suppress the group based on values of top 5 Mailings.DELIVERED?

No correct solution

OTHER TIPS

first of all you should do a group by date, then a group by ID, then you will have to create the below formula in your ID group header to initialize your counter variable

WhilePrintingRecords;
            Global numberVar record;
            record:=0;

then place in your details this other formula

WhilePrintingRecords;
        global numbervar record;
        record:=(record+1);
        record;

this formula will help you counting details record in order to suppress your details. then in your details section expert you will put the following Mailings.DELIVERED <> 0 or record > 5(this will suppress your detail section when the mailing was delivered or when you have more than 5 records )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top