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

Highlight cross tab cell and also other cells 1

Status
Not open for further replies.

swiss2007

Technical User
Aug 13, 2007
92
US
I have a Cross tab that has

Rows
Country

Columns
Year

Summarized fields
orderamt
Profit(Y/N)

sample data looks like

2001 2002
Austria Orderamt 4200 6000
Profit(Y/N) Y N

France Orderamt 5500 5000
Profit(Y/N) N N

Germany Orderamt 12000 10000
Profit(Y/N) N Y

Ireland Orderamt 10000 8500
Profit(Y/N) N N

USA Orderamt 25000 32000
Profit(Y/N) Y N

So, I want to highlight both orderamt and Profit(Y/N) cells in green if the Profit(Y/N) is
Y for a country and this field(Profit(Y/N)) is summarized (mode) of the Profit(Y/N) field from the database.
Hope, this is clear enough.

 
Hello you should be able to right click on the feild and click on Highlighting expert.
 
But the highlighting expert only gives the option to highlight Profit(Y/N) field and not Orderamt field based on the Profit(Y/N) field.
 
I'm not familiar with CR2008, so there might be a better way, but this does work. First, the profit field has to be the first summary field, so if you want it second, you must add it again as your first summary and then suppress it (you can minimize the height). Select the inner cell for profit->right click->format field->suppress->x+2 and enter the following formula:

whileprintingrecords;
stringvar pyn := currentfieldvalue;
false

Next, select both (displayed) summaries->right click->format field->border->color->background->x+2 and enter:

whileprintingrecords;
stringvar pyn;
if pyn = 'Y' then
cryellow else
crnocolor

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top