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!

Cross tab cell color formatting issue 1

Status
Not open for further replies.

forumguy

MIS
Feb 5, 2007
16
0
0
US
Hi guys,

I set up a cross tab in a group header. From the cross tab expert i introduced a row field and a column field . The summary is a MAX of a string field, say X . I wanted to conditionally format the color of field X based on a value of another field, say Y. So wrote this formatting formula on field X.

If Y = ... then RGB(...) else RGB(...)

The color of X wont change.

Appreciate your comments.

thanks
 
You would have to add the other field to the crosstab, although it could be suppressed. I'm not sure what the summary would be, maximum possibly, but you would know that. Make this summary your first one, followed by the one you want colored. Then in preview mode, select the first summary->right click->format field->common->suppress->x+2 and enter:

whileprintingrecords;
numbervar y := currentfieldvalue; //assuming it's a number
false

Then select the second summary->right click->format field->borders->color->background->x+2 and enter:

whileprintingrecords;
numbervar y;
if currentfieldvalue = y then
crYellow else
crNocolor

You can suppress the first summary and also minimize it's height of width (depending upon whether you are using a horizontal layout for the summary fields, which is available in the higher versions of CR).

You should always identify your CR version also.

-LB
 
Hi Guys,

I am using crystal 10. The cross tab is in the group.

It was giving me a blank page in the middle of the report. So, unchecked the "Keep together" in the section expert in the group. And the Blank page was gone. But now with "Keep together option" unchecked, it gives error " Error formatting the cross tab" after one particular page.

Appreciate ur comments.

Thanks
 
Does the error go away if you check "keep together"? Are you talking about keep together in the section expert or "keep group together" in the group expert?

Did you check to see whether the white space might be from an unsuppressed, but unused detail or other section?

-LB
 
Appreciate ur response LB. Was able to get rid of blank page. The problem was that I made some extra sections of the same group just to display some headers.

I now Pulled all the headers in the same group where I had the crosstab and the blank page disappeared.

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top