on 04-30-2015 4:45 AM
Hi Gurus,
I am trying to highlight the background color of a cell based on another cell.
Scenario below:
1. if a fieldx value = 0, then, highlight the whole crosstab row in Maroon
2. no background color in first column of crosstab
3. if the cell value in crosstab column 2 or column 3 belongs to a string of values, then, highlight the value in column 2 or column 3 as Green.
4. If the cell value in crosstab column 2 or column 3 belongs to a string of values, then highlight the value(s) in any of the columns beyond column 3 , that belongs to a string of values, in Blue.
5. If the cell value in crosstab column 2 or column 3 does not belongs to a string of values, then highlight the value(s) in any of the columns beyond column 3, belongs to a string of values, in Red.
--
Local ITEM
ITEM = TRIM(mid(CurrentFieldValue,3))
if GridRowColumnValue ("@Table.Fieldx") = 0 then
formula = crMaroon
else
if GridRowColumnValue ("Table.crosstabcolumn")=1 then
formula = crNoColor
else
if instr({StringX},ITEM)=0 then
formula = crNoColor
else
if instr({StringX},ITEM) <> 0 then
if GridRowColumnValue ("Table.crosstabcolumn")=2 then
formula = crGreen
else
if GridRowColumnValue ("Table.crosstabcolumn") > 3 then
formula = crBlue
if GridRowColumnValue ("Table.crosstabcolumn") > 3 then
formula = crRed
End if
End if
End if
End if
End if
----------
Gurus,
I am unable to highlight blue and red colors correctly
Hi All,
I have been trying to reference one cell to another in a row of the crosstab. But, been unsuccessful so far. Any idea if I am on the right path? Is it possible to compare one cell to another cell in a row ?
Am I missing something here??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still looking for some help on this. I still am not able to reference the color or data of one cell in a crosstab by another cell
local Equip
Equip = TRIM(mid(CurrentFieldValue,3))
if len(Equip) < 4 then Equip = Equip + ","
if GridRowColumnValue ("@ToiletsCount") = 0 then
formula = crBlack
end if
if ({vwv_EquipToilet.GreenToiletCt}=1 and (GridRowColumnValue ("@ToiletsCount") >=1) and (instr({SP_T_Equip;1.T_Equips}, Equip) <> 0) and (GridRowColumnValue ("EQLINK_DTL.eq_order") > 3)) then
formula = crBlue
end if
if ({vwv_EquipToilet.GreenToiletCt}=0 and (GridRowColumnValue ("@ToiletsCount") >=1) and (instr({SP_T_Equip;1.T_Equips}, Equip) <> 0) and (GridRowColumnValue ("EQLINK_DTL.eq_order") > 3)) then
formula = crMaroon
end if
--
The above statement needs to be updated to work dynamically.
Hi Devi,
Would you be able to attach the report with saved data please?
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What needs to be highlighted in the crosstab:
'if cell in column 2 and/or 3 has a equip, then highlight that cell in lime.
'if cell in column 2 and/or 3 has a equip ,then highlight all those cells in that row with equip in column > 3 in aqua
'if cell in column 2 and/or 3 does not have a equip, then highlight all those cells in that row with equip in column > 3 in red
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.