Guest
We are using Crystal 8.5 with Oracle 9 databases. I have a report that contains details of quotes we have made and which the business has been won or lost. For each type we have a set of reasons. There are up to 19 different reasons (although this can increase in the future). The records are grouped by sales person, date entered, quote number, line number & release number. Each of the quotes has a reason code and these codes cannot be grouped together due to the earlier groupings.
What I am trying to do is create a summary at the end of the report which lists the distinct reasons with the number of quotes which used each reason and a percentage of the total number of quotes which used each reason ie:
The reasons pulled through are dynamic ie there may be 2 different reasons or there may be 15 different reasons dependent upon the dates selected to report on and I do not want to 'hard code' the reasons in the report as additional reasons may be added at a later date.
I had thought about creating a 2 dimensional array into which was added the reason and the second element was updated with an incrementing count whilst printing the records but I cannot see how to a) create the array with the distinct reasons or b) search the array to find the correct element to update the count as I go through each line in the report.
Any suggestions as to how to go about this will be much appreciated.
Thanks in advance.
Regards
Richard Chambers.
What I am trying to do is create a summary at the end of the report which lists the distinct reasons with the number of quotes which used each reason and a percentage of the total number of quotes which used each reason ie:
Code:
Reason No of Quotes %
REPEAT BUSINESS 30 60%
ABLE TO MEET SPEC 10 20%
ABLE TO MEET LEAT TIME 10 20%
TOTAL 50 100%
The reasons pulled through are dynamic ie there may be 2 different reasons or there may be 15 different reasons dependent upon the dates selected to report on and I do not want to 'hard code' the reasons in the report as additional reasons may be added at a later date.
I had thought about creating a 2 dimensional array into which was added the reason and the second element was updated with an incrementing count whilst printing the records but I cannot see how to a) create the array with the distinct reasons or b) search the array to find the correct element to update the count as I go through each line in the report.
Any suggestions as to how to go about this will be much appreciated.
Thanks in advance.
Regards
Richard Chambers.