I have attached an image of my rdlc.The arrows point to the row and column groups I will reference.
There is a field which outputs either a 1 or a 0 based on whether it is a "supplementary event" or not. For context, this is things like ice cream, programmes when you go see a show.
The row group is grouped on Order ID to show a row per order, and is filtered to ONLY show orders which contain events with BOTH a 1 and a 0. Meaning they have booked a main ticket and a supplementary item. This is working perfectly.
The first column group is filtered to show the main event they have booked for, so supplementary event = 0. When you run the data, you will only ever include one main event, so this column is fine.
The second column group with the red arrow is filtered to only show events where supplementary event = 1, and is grouped on event name which splits out each supplementary event giving the totals for each. The end result is a report which shows how many supplementary events a customer has booked for a main event.
What I'm struggling with is getting totals for each supplementary event as shown in red above.
I can't just Sum(), because the rows have been filtered to only show customers who have purchased 2 different types of event, but the total has to sit outside of this group as it's grouped on order ID and I'm after the total.
If you need any more information please let me know.
I have tried Sum() but that includes orders which only have a supplementary item and not a main event which I don't want I have tried Sum(field, "OrderIDgroup") but that errors as it's referencing the a row group outside of it. I've played with Code.AddTotal() and Code.GetTotal() and they are pulling incorrect figures.