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

Format multiple fields at once

Status
Not open for further replies.

pb100

Programmer
Aug 31, 2006
36
US
Hi all,
Using Crystal XI, is there a more efficient way to apply formulas to format fields?

I have table style reports with 3-4 groups whose fields are the result of formulas. I overlay those fields with an 'N/A' text field and set the format to suppress if certain conditions are met on the formula. I also set a suppress formula on the formula field to suppress if the opposite is true. It's a very manual process to set the formatting conditions but each field needs to be treated separately. Is there a better way?

Thanks in advance!!
 
Have you worked with 'currentfieldvalue'?

You can do a blanket change by highlighting multiple formulas (on the canvas) and then right-click, format objects. Then you plug a formula into the suppression such as

if currentfieldvalue<0
then true
else false

Which goes into all of them.

Have you also considered having the "N/A" be part of the formula rather than using it to suppress? That's another route. Depending on datatype issues that would sometimes be better. Or you could use the display string and currentfieldvalue.

if currentfieldvalue<0
then "N/A"
else totext(currentfieldvalue,"#")

That sort of thing.

What are some of these conditions that might cause a difference in suppression from one formula to the next?

 
You should be able to select all objects you want formatted the same way->right click->add your conditional formatting formula. You have to be careful though as this can undo earlier formatting that might be unique to one object.

Depending upon what you are testing, you could use currentfieldvalue or criteria based on other fields in the report.

-LB
 
Thank you both for the great tips! It did save some time to use currentfieldvalue!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top