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!

conditional formating for XTAB not working

Status
Not open for further replies.

cjbrown815

IS-IT--Management
Mar 2, 2006
525
US
Hi,
I have a XTAB report ROW #1 SAMPLE.DATE1, ROW #2 SAMPLEPARAM.PA_NAME, COLUMN #1 @SORT COLUMN #2({SAMPLE.SAMPLE_TYPE} + "=" + {SAMPLETYPE.ST_NAME}) for display

the summarized field is MAX of SAMPLEPARAM.SRESULT

the probem is Crystal is only picking up the first part of the conditional formating criteria. Regardless its turning anything > 0 to red

Conditional Formating
if {SAMPLEPARAM.PA_NAME} = "Coliform-Ct" and val(currentfieldvalue) > 0 or
currentfieldvalue = "TNTC" or
currentfieldvalue like ">*" then crRed else
if currentfieldvalue = "NR" then crBlue else

if {SAMPLEPARAM.PA_NAME} = "Yeast-Ct" and val(currentfieldvalue) >= 10 or
currentfieldvalue = "TNTC" or
currentfieldvalue like ">*" then crRed else
if currentfieldvalue = "NR" then crBlue else


if {SAMPLEPARAM.PA_NAME} = "Mold-Ct" and val(currentfieldvalue) >= 10 or
currentfieldvalue = "TNTC" or
currentfieldvalue like ">*" then crRed else
if currentfieldvalue = "NR" then crBlue else
crGreen

-CJ

SQL2005// CRXIr2// XP Pro

"Progress lies not in enhancing what is, but in advancing toward what will be"
-KHALIL GIBRAN 1883-1931
 
cjbrown815,

At a glance, I would suggest you need to add in Parathesis for grouping the logic of your conditional formats.

For example, you wrote:
Code:
{SAMPLEPARAM.PA_NAME} = "Coliform-Ct" and val(currentfieldvalue) > 0 or
currentfieldvalue = "TNTC" or
currentfieldvalue like ">*"

Could be interpretted as:
Code:
[red]([/red]{SAMPLEPARAM.PA_NAME} = "Coliform-Ct" and val(currentfieldvalue) > 0[red])[/red] or
currentfieldvalue = "TNTC" or
currentfieldvalue like ">*"

OR:
Code:
{SAMPLEPARAM.PA_NAME} = "Coliform-Ct" and [red]([/red]val(currentfieldvalue) > 0 or
currentfieldvalue = "TNTC" or
currentfieldvalue like ">*"[red])[/red]

or a few other combinations. As I am unsure what the intended logic, I will leave this with you to troubleshoot further. Again, I am not 100% this is the issue, but it seems like a good place to start.

Hope this helps! Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top