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

Print parameter range, change value in text

Status
Not open for further replies.

DanHD

Technical User
Dec 1, 2008
98
NL
hello,

to print the selected parameter to the report, I use the formula:

"Status: " & Minimum ({?ProjectStatus} )
&
" to Status: " & Maximum ( {?ProjectStatus} )

The value can be 1 or 2.
I want to print when the value is 1 'open' and if 2 'closed'. I don't have succed with an if-then statement in the formula.
Any ideas?

Dan
 
Please show the if ..then..else formula which did not work.

What was the error message

You will need 2 formula

@open
If Minimum ({?ProjectStatus} ) = 1 then 'Status: Open' else ''

@closed
If Minimum ({?ProjectStatus} ) = 2 then 'Status: Closed' else ''

Place these two formula in text box

@open & @closed

This seems like a strange thing to do if they can only be 1 and 2 why not just write some text.

What happens if they are not 1 or 2?

Ian
 
Hi Ian

I've used the if-then in the wrong way.

I needed in your formula @closed the minimum in maximum and now it works fine.

Case:
there is always a 1 (open) or 2 (closed) and in the report the user can also select both status.

Question (hypothetical)
what should the formula be if there is a 3th status, like 'standby'.

Dan
 
Change formula to something like

@open
If Minimum ({?ProjectStatus} ) = 1 then 'Status: Open' else
If Minimum ({?ProjectStatus} ) = 2 then 'Status: Closed' else
'Status: Standby'

@closed
If Maximum ({?ProjectStatus} ) = 1 then 'Status: Open' else
If Maximum ({?ProjectStatus} ) = 2 then 'Status: Closed' else
'Status: Standby'

Ian

 
hoi Ian

Thanks for the help, I can get to work with it.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top