reporter42
Technical User
I'm using Crystal 10 against a Progress database via an ODBC connection.
I have a field in my database that is an array. It contains rates that correspond to meters. Each record can have up to 8 meters on it (also an array field) and therefore 8 rates (1 corresponding to each meter). I need to get a count of the number of meters on each rate. I'm thinking I need to do something with variable arrays but not quite sure how to start.
Data example:
Below is an example of the data that is in the rate field when just the field is displayed on the report.
record 1, rate field has 2;0;0;0;0;0;0;0
record 2, rate field has 2;3;0;0;0;0;0;0
record 3, rate field has 7;7;0;0;0;0;0;0
record 4, rate field has 6;7;0;0;0;0;0;0
record 5, rate field has 3;0;0;0;0;0;0;0
What I would like to see is just a count of the rates so
2 should be count of 2
3 should be count of 2
6 should be count of 1
7 should be count of 3
I would like the count to be in rate number order as displayed above; however would be willing to get what I get if I can get the correct counts. I know that I can split the array out into individual elements but I cannot figure out how to get it to count correctly.
I have a field in my database that is an array. It contains rates that correspond to meters. Each record can have up to 8 meters on it (also an array field) and therefore 8 rates (1 corresponding to each meter). I need to get a count of the number of meters on each rate. I'm thinking I need to do something with variable arrays but not quite sure how to start.
Data example:
Below is an example of the data that is in the rate field when just the field is displayed on the report.
record 1, rate field has 2;0;0;0;0;0;0;0
record 2, rate field has 2;3;0;0;0;0;0;0
record 3, rate field has 7;7;0;0;0;0;0;0
record 4, rate field has 6;7;0;0;0;0;0;0
record 5, rate field has 3;0;0;0;0;0;0;0
What I would like to see is just a count of the rates so
2 should be count of 2
3 should be count of 2
6 should be count of 1
7 should be count of 3
I would like the count to be in rate number order as displayed above; however would be willing to get what I get if I can get the correct counts. I know that I can split the array out into individual elements but I cannot figure out how to get it to count correctly.