Hello there,
I am attempting to create a report on some insurance transactions, which consist of a main policy transaction along with some add-ons (such as breakdown recovery, legal expenses cover, and so on)
The main issue with the data is that per customer, the add-ons are listed as separate policy types but the requirements for the report are that they be listed alongside the policy type to which they relate.
Some sample data and a mock report might help me to explain.
[tt]
Sales Staff Customer Id Policy Type Amount
John 123 Motorbike 300.00
John 123 Legal 10.00
John 456 Car 400.00
John 456 Breakdown 10.00
John 456 Legal 10.00
John 789 Motorbike 300.00
[/tt]
So in the above data, John sold a Motorbike policy to customer 123 with additional Legal Expenses cover. A different customer 456 was sold Car Insurance with extra Breakdown Recovery, as well as Legal Expenses cover. Finally, a third customer bought motorbike insurance with no extras.
This data would be required to be displayed as follows:
[tt]
Staff Policy Count Legal Breakdown Total
John Car 1 1 1 420.00
John Motorbike 2 1 0 610.00
[/tt]
Note that the add-ons (extras) and the policies themselves are counted as well as included in the total for that policy type.
My problem is that if I group by Policy Type, then I lose the association between the policy and its add-ons because they become sorted alphabetically. Sometimes the add-on is listed before its parent policy as well, which scuppered an idea I had, of grouping by a formula that used a global stringVar to remember the policy type.
If I group by the customer THEN the policy type to retain the association, then I end up with multiple instances of the policy type in 'random' order.
If anyone has any ideas how to go about this, I'd be extremely grateful!
We're on Crystal XI 11.0.0.1883 and although the data source is an old version of Informix, it isn't particularly relevant as I can reproduce the problem using data from Excel. (I'm hoping I won't have to start tampering with SQL stuff to achieve this as it needs to be easily maintainable.)
I think that's everything ...
Many thanks in advance,
Robin
I am attempting to create a report on some insurance transactions, which consist of a main policy transaction along with some add-ons (such as breakdown recovery, legal expenses cover, and so on)
The main issue with the data is that per customer, the add-ons are listed as separate policy types but the requirements for the report are that they be listed alongside the policy type to which they relate.
Some sample data and a mock report might help me to explain.
[tt]
Sales Staff Customer Id Policy Type Amount
John 123 Motorbike 300.00
John 123 Legal 10.00
John 456 Car 400.00
John 456 Breakdown 10.00
John 456 Legal 10.00
John 789 Motorbike 300.00
[/tt]
So in the above data, John sold a Motorbike policy to customer 123 with additional Legal Expenses cover. A different customer 456 was sold Car Insurance with extra Breakdown Recovery, as well as Legal Expenses cover. Finally, a third customer bought motorbike insurance with no extras.
This data would be required to be displayed as follows:
[tt]
Staff Policy Count Legal Breakdown Total
John Car 1 1 1 420.00
John Motorbike 2 1 0 610.00
[/tt]
Note that the add-ons (extras) and the policies themselves are counted as well as included in the total for that policy type.
My problem is that if I group by Policy Type, then I lose the association between the policy and its add-ons because they become sorted alphabetically. Sometimes the add-on is listed before its parent policy as well, which scuppered an idea I had, of grouping by a formula that used a global stringVar to remember the policy type.
If I group by the customer THEN the policy type to retain the association, then I end up with multiple instances of the policy type in 'random' order.
If anyone has any ideas how to go about this, I'd be extremely grateful!
We're on Crystal XI 11.0.0.1883 and although the data source is an old version of Informix, it isn't particularly relevant as I can reproduce the problem using data from Excel. (I'm hoping I won't have to start tampering with SQL stuff to achieve this as it needs to be easily maintainable.)
I think that's everything ...
Many thanks in advance,
Robin