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

ReportNet: Conditional formatting using a prompt parm in the condition

Status
Not open for further replies.

JGirl

Programmer
Aug 21, 2002
210
AU
I have a reportnet report with conditional formatting. I have a boolean variable, where if the actual >= target a red icon is displayed, otherwise a green icon is displayed.

When I hard code the value in the variable expression as
Code:
 Actual >= 40
the conditional formatting works correctly.

But...I want to be able to allow the user to enter the target value via a prompt.

If I edit the variable expression to be something like
Code:
 Actual >= ParamValue("parm_Target")
or
Code:
 Actual >= ParamDisplayValue("parm_Target")
all of the data appears with the 'No' clause formatting for all rows (regardless of whether the condition is true or false). Now I know that this is because the parameter functions output the values as strings when I am actually comparing the value to a numnber.

So...to get around this, I've created an additional column in the report called 'Min Value' with the expression
Code:
 cast_float(?parm_Target?
and changed the variable expression to
Code:
 Actual >= [Min Value]
This works correctly, but...

I dont want to have to create the extra report column and I want to be able to use the parameter value that I have entered directly in the variable expression.

Anyone know how to do this?

J
 
Now I know that this is because the parameter functions output the values as strings when I am actually comparing the value to a numnber."

Did you try creating a string variable instead of Boolean?

JKas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top