Crystal Reports - What "Ranges" Did You Run?
Posted by Dee Dutton on Fri, Jan 15, 2010 @ 01:02 PM
Custom Crystal Reports are often written to allow the ability to select a "range" of values, such as "Starting Customer Number" and "Ending Customer Number". Some of these parameters allow multiple or discrete values and it can be difficult to see the range or all the values that were selected.
The following formula built into the report will expose these values. Create the formula and then put it into your Page or Report Header:
WhileReadingRecords;
NumberVar NumRanges := ubound( {?Additional Customers} );
NumberVar i := 0;
StringVar outStr := "";
for i := 1 to NumRanges
step 1
do
(
StringVar maxCN := Maximum( {?Additional Customers} [i] );
StringVar minCN := Minimum( {?Additional Customers} [i] );
outStr := outStr & iif ( outStr <> "" , "; " , "" ) & iif( len (minCN) > 0, minCN, 'The Beginning ') &
' to ' &
iif( len (maxCN) > 0, maxCN, ' The End' );
);
outStr;
For assistance with this, please contact our office directly!