Platform: CR 9 on WIN2K reading an Access database.
Question: I've created a standard report and want to display a count of values for one field in the footer. The field (PREMISES in table 1 CRIME) can contain any string value, i.e., ALLEY, STREET, PARKING LOT, etc. The string values are not static and I would like to find a way to list each PREMISE value and the number of times it appears on the report.
I thought I could use an array to do this and have inserted three formulas in the report:
Report Header (suppressed)
whileprintingrecords;
Global stringvar datalist := "";
Details (suppressed)
whileprintingrecords;
Global stringvar datalist;
datalist:= {1_Crime.Premises} + "," + datalist;
Report Footer
whileprintingrecords;
Global stringvar datalist;
datalist;
The variable display in the footer looks like:
PARKING LOT,ALLEY,ALLEY,DRIVEWAY,STREET,ALLEY,STREET,STREET,DRIVEWAY,PARKING LOT,ALLEY,CURBSIDE... and so forth
How can I get each unique string value and the count of that value into a format which would display like this:
PARKING LOT 2
ALLEY 4
STREET 3
DRIVEWAY 2
CURBSIDE 1
I cannot group on the field for internal reasons.
Thanks in advance
-Dave
Question: I've created a standard report and want to display a count of values for one field in the footer. The field (PREMISES in table 1 CRIME) can contain any string value, i.e., ALLEY, STREET, PARKING LOT, etc. The string values are not static and I would like to find a way to list each PREMISE value and the number of times it appears on the report.
I thought I could use an array to do this and have inserted three formulas in the report:
Report Header (suppressed)
whileprintingrecords;
Global stringvar datalist := "";
Details (suppressed)
whileprintingrecords;
Global stringvar datalist;
datalist:= {1_Crime.Premises} + "," + datalist;
Report Footer
whileprintingrecords;
Global stringvar datalist;
datalist;
The variable display in the footer looks like:
PARKING LOT,ALLEY,ALLEY,DRIVEWAY,STREET,ALLEY,STREET,STREET,DRIVEWAY,PARKING LOT,ALLEY,CURBSIDE... and so forth
How can I get each unique string value and the count of that value into a format which would display like this:
PARKING LOT 2
ALLEY 4
STREET 3
DRIVEWAY 2
CURBSIDE 1
I cannot group on the field for internal reasons.
Thanks in advance
-Dave