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

format crosstab cell conditionally 1

Status
Not open for further replies.

emcevoy

Programmer
Feb 4, 2001
144
0
0
CA
looking for some help here.
Have a crosstab

rows Column year
TypeSort (showing type) Year
CatagorySort (showing Catagory)

Summary fields
Sum(Formula)

this works great, however what I want to do is based on the catagory I want to format the summary field decimal places. for example, if the last 7 characters are percent, then I want 2 decimals if it is not then no decimals.

I can format one way or the other but never can get the summary field formatting formulas to see that the catagory is percent.

any ideas? please let me know if you need further verification on this. I am desparate.

thanks all!

Eileen
 
Please show an example of the category field. Are you saying the category field appears like this: category%%%%%%%? What kind of summary is it (count or sum or?)

-LB
 
Hi lbass.

the summary is a sum of a formula and the catagory would be 'white percent'

thanks

Eileen McEvoy
Authorized Crystal Engineer
Crystal Reports Consultant and Trainer
emcevoy@crystalconsulting.ca
 
Right click on and inner cell->format field->number->customize->decimal->x+2 and enter:

if right(gridrowcolumnvalue("table.categorysort"),7) = 'percent' then
2 else 0

The name of your row field belongs within the double quotes, with the curly brackets removed. For example, if it is a formula, then it would be: "@categorysort".

Make sure the rounding is set for two decimals also.

Note that if percent can be in a different case you would have to accommodate that also.

-LB
 
Thank you! that is what I was missing was the gridrowcolumnvalue, I knew it was something simple.

thanks again
Eileen

Eileen McEvoy
Authorized Crystal Engineer
Crystal Reports Consultant and Trainer
emcevoy@crystalconsulting.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top