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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Parameter Descriptions rather than values

Status
Not open for further replies.

BigC72

MIS
Oct 15, 2004
69
0
0
US
I am using CR 8.5 and would like to know if there is a way to display a Default Parameter description in the report rather than it's value. I have a report that allows my end users to choose a particular doctor or doctors by their assigned number or I allow them to choose all doctors by choosing zero with the following addition to the Selection Expert:

(if{?doc_numb} = 0.00 then true

else {TRANSACTIONS.PHY_CODE} = {?doc_numb}) and

I then added 0 as a defualt value in the parameter field and included the description of "All Physicians". When inputting parameters to run the report the "All Physicians" description displays but when the report completes the parameter displays as 0 in the report header where the parameter is located.

Is there a way to get the description to display in the RH also?
 
You should be able to create a formula and put it in the report header in place of the actual parameter. If you just want the words "All Physicians" to show instead of zero then create the following formula

IF {?doc_numb} = 0 Then "All Physicians"
Else {?doc_numb}
 
Thanks for your help. I was trying to complicate it too much...
 
If you have a table that has the physician name and ID, you could create a subreport to place in the report header that is linked to the main report by {?parm}. Otherwise you can hardcode the physician names in a formula like:

whileprintingrecords;
stringvar docs;
numbervar counter;
numbervar i := ubound({?parm});

for counter := 1 to i do(
docs := docs +
(
if {?parm}[counter] = "001" then "Dr. Strangelove" else
if {?parm}[counter] = "002" then "Dr. No" else
if {?parm}[counter] = "003" then "Dr. Jekyll" else
if {?parm}[counter] = "000" then "All Doctors" else ""
) + ", ");
left(docs,len(docs)-2);

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top