I am processing work order records that have the following fields:
name, address, deliveryDate...Unit1Type, Unit1Count, Unit2Type, Unit2Count, Unit3Type, Unit3Count, Unit4Type, Unit4Count...
The UnitType fields can contain any text string and represent the types of units delivered to the customer. The database designers have created this setup so that a given customer can have up-to 4 unit types delivered in a single work order. The UnitCount fields show how many of each type was delivered.
In printing the work order report, I have been asked to create a summary across all the work orders that sums the count of each type of unit in the report. The only way I have of knowing the types of units is by keeping counts as I process the work order records.
Can someone give me help on the code I would need for the formulas? I haven't used arrays in Crystal and suspect that is the only solution. I would need to create the array and check if the unit type was already in it, and either increment or create a new element.
Thanks very much!
Meryl
name, address, deliveryDate...Unit1Type, Unit1Count, Unit2Type, Unit2Count, Unit3Type, Unit3Count, Unit4Type, Unit4Count...
The UnitType fields can contain any text string and represent the types of units delivered to the customer. The database designers have created this setup so that a given customer can have up-to 4 unit types delivered in a single work order. The UnitCount fields show how many of each type was delivered.
In printing the work order report, I have been asked to create a summary across all the work orders that sums the count of each type of unit in the report. The only way I have of knowing the types of units is by keeping counts as I process the work order records.
Can someone give me help on the code I would need for the formulas? I haven't used arrays in Crystal and suspect that is the only solution. I would need to create the array and check if the unit type was already in it, and either increment or create a new element.
Thanks very much!
Meryl