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

Representing conditional texts in reports 2

Status
Not open for further replies.

maddyyikes

IS-IT--Management
Jul 19, 2004
32
US
HI!

Using: Crystal Reports 8.5
P4 Database(proprietary)
ODBC driver

I want to describe different texts in the same text box for a given report depending on the condition/s being satisfied.

For instance if I am running a report which returns the most catastrophic problems being logged, then the text box should be as follows: " Catastrophic Problems!!"

On the other hand if I am running a report which primarily reports "Mainframe" related problems then the text in the text box should change to "Mainframe problems"

How can this be dynamically achieved? Thanx in advance!!

 
You could put both text boxes on the report,
one on top of the other and then
conditionally suppress them.

Or, make a formula with the value being
based on the conditions.
 
You can certainly put one text object on top of another, but this can be confusing and not always clear as to what your intent is.

It is best to create a formula that will return one or the other.

Create a new formula.
Use this code, and modify the condition in the sample to the actual condition you need:
Code:
If {table.field} = "Catastrophic" then
    "Catastrophic Problems!!"
else
    "Mainframe Problems"

Use the formula in place of the 2 text objects, and yo udon't have to do anything with suppression.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top