Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I show parameters 1

Status
Not open for further replies.

emoongq

IS-IT--Management
Jun 3, 2004
23
MX
I want to show in the header one or more parameters selected in Crystal 7.0
 
You should be able to drag the parameters from the Field Explorer, under the parameters node, into the Report Header. Drag each parameter that you want to see so that it will display the values selected.

~Brian
 
I'll assume that you mean that you have a parameter with multiple values selected, as opposed to many different parameters.

Of course displaying them would be based on the type of parameter:

Date range:

totext(minimum({?date}))+" - "+ totext(maximum({?date}))

Numeric or string:

Local NumberVar Counter;
Local StringVar Result;
Local NumberVar Array NumArray := {?Numbers};
UBound(NumArray);
For Counter := 1 To UBound(NumArray) Do
(
Result := Result + totext({?AccountNumber}[Counter]) + ", "
);
left(Result,len(result)-2)

Note that the above shows numerics being converted, the change this for strings, remove the totext()

-k
 
I don't think the FOR loop is available in CR7, so you will have to hard code the loop this way...

Stringvar sList := {?ParmList} [1];
if count({?ParmList}) >= 2 then
sList:= sList + ", " + {?ParmList} [2];
if count({?ParmList}) >= 3 then
sList:= sList + ", " + {?ParmList} [3];
if count({?ParmList}) >= 4 then
sList:= sList + ", " + {?ParmList} [4];
if count({?ParmList}) >= 5 then
sList:= sList + ", " + {?ParmList} [5];
// repeat until boredom sets in...
// or you go past 254 characters in length
sList

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top