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!

Condtional Fomatting Issues

Status
Not open for further replies.

Crystal001

IS-IT--Management
Jun 26, 2013
1
CA
Hi All,

I have a crystal report that I am running with four columns that are details(one being a descriptive text field and the other three being number fields). What I am tring to accomplish is that, based on a column A field, when a particular record field appears in the data set (which is a text), then the numbers in column b for that record, which are already showing up as two decimal places (text'abcd'= 1,234.00 but for other data field looks like this : 1,234.80) need to round to 0 decimal places else for other text fields for column A needs to remain as two decimal places. I applied the following formula in the format field dialog box-> Numbers tab->customize->under X-2 of the decimals sections (also tried it in the Rounding X-2 section; one at a time). The formula that I am using is as follows: If column A= 'abcd' then round(Column B,0) else round(column B,2). It evaluated on one page but when clicking on the next page arrow I get a 'bad formula result'. Similarly the same will need to be applied to the other two column (c and d).

 
I think I understand what you are trying to accomplish, but you are not quite where you should be. You need to create a formula to replace column B. I the formula you would have the If column A= 'abcd' then round(Column B,0) else round(column B,2). I think this will work for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top