I've got a report that I had to create a sub-report to pull in incentives and quantity for each drive we had. A sub-report was needed because we can have multiple incentives per drive and this seemed like the best way to handle this.
And the report is working correctly. But what I'd like to do now is pass two variables from the sub-report back to the main report and put them in the results in a pivot table/cross-tab. In the attached screenshot, this particular drive has three incentives on the drive: (1) "Love it" Ice Cream (5 Qty), (2) AMOB Lunch or Early Bird (6 Qty), and (3) Beach Towel (3 Qty).
If possible, I'd like to get a cross-tab in the report footer (or whatever section necessary) and have these values displayed. I've done something similiar to this before and I'm trying to reuse it, but I don't think it is quite right.
In the sub-report, I created two new formulas:
IncentiveVariable:
WhilePrintingRecords;
Shared NumberVar Incentives := cdbl({rpt_EquipmentMaster.Description})
QtyVariable:
WhilePrintingRecords;
Shared Numbervar Quantity := cdbl({rpt_EquipmentDetail.Quantity})
In the main report, I created these two formulas:
IncentiveVariable:
WhilePrintingRecords;
Shared NumberVar Incentives;
QTYVariable:
whileprintingrecords;
shared numbervar Quantity;
I think part of my problem is the IncentiveVariable in the sub-report. It is Shared NumberVar but it is reading from EquipmentMaster.Description column which is not a number. And then a second problem, would I need to create a running total for the quantity to ensure multiple choices of the same incentive are summarized?
Thanks,