Focal Point
[SOLVED] Data not centered when highlighted

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/305109221

May 21, 2009, 03:13 PM
msands
[SOLVED] Data not centered when highlighted
I need help with alignment of data when a row is highlighted. If a row meets the condition to be highlighted, the row is highlighted, but the alignment of columns 2,3,4,5 changes and are no longer centered.

TYPE=REPORT,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLUMN=N5,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N6,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N7,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N8,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N9,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N10,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N11,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N12,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N13,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N14,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N15,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N16,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N17,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,
COLUMN=N18,
BACKCOLOR=RGB(220 220 255),
WHEN=FLAG EQ '1',
$
TYPE=DATA,COLUMN=P2,JUSTIFY=CENTER,$
TYPE=DATA,COLUMN=P3,JUSTIFY=CENTER,$
TYPE=DATA,COLUMN=P4,JUSTIFY=CENTER,$
TYPE=DATA,COLUMN=P5,JUSTIFY=CENTER,$
TYPE=TITLE,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR='LIGHT BLUE',
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,HEADALIGN=BODY,$
TYPE=TABFOOTING,
SIZE=9,
STYLE=BOLD,
JUSTIFY=RIGHT,
$
TYPE=TABFOOTING,ITEM=2,JUSTIFY=CENTER,$
TYPE=TABFOOTING,ITEM=3,JUSTIFY=CENTER,$
TYPE=TABFOOTING,ITEM=4,JUSTIFY=CENTER,$
TYPE=TABFOOTING,ITEM=5,JUSTIFY=CENTER,$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,HEADALIGN=BODY,$
TYPE=SUBFOOT,
SIZE=9,
JUSTIFY=RIGHT,
$
TYPE=SUBFOOT,ITEM=2,JUSTIFY=CENTER,$
TYPE=SUBFOOT,ITEM=3,JUSTIFY=CENTER,$
TYPE=SUBFOOT,ITEM=4,JUSTIFY=CENTER,$
TYPE=SUBFOOT,ITEM=5,JUSTIFY=CENTER,$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N11,
WRAP=1.180556,
$
TYPE=REPORT,
COLUMN=N10,
WRAP=1.180556,
$
TYPE=REPORT,
COLUMN=N12,
WRAP=1.500000,
$
ENDSTYLE
END

This message has been edited. Last edited by: Kerry,
May 21, 2009, 03:22 PM
Francis Mariani
The quick answer is to add
JUSTIFY=CENTER,
in the conditional styling for background colour.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 21, 2009, 03:50 PM
msands
Thanks for your help. I did this for columns 2,3,4,5, and they centered as desired:

TYPE=DATA,
COLUMN=P2,
BACKCOLOR=RGB(220 220 255),JUSTIFY=CENTER,
WHEN=FLAG EQ '1',
$
May 21, 2009, 03:58 PM
Francis Mariani
Contrary to logic, sometimes one styling line overrides another.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 25, 2009, 07:52 AM
<JG>
You should not mix your types of column notation

The documentation is quite explicit on this issue
quote:
Note:Within a StyleSheet, all columns must be specified in the same way, either by field name or positional reference.


Although N and P are both positional they are not the same.
May 25, 2009, 09:28 AM
Francis Mariani
But N and P are both "positional reference" so they fit the rule.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 25, 2009, 09:42 AM
<JG>
Francis is it a single rule or a compound rule.

I always tend to got for the strictest interpretation where IB documentation is concerned.

As I said N and P are both positional, however they are measured on a different basis so are not the same.
June 01, 2009, 09:12 AM
msands
Please consider this issue resolved. Thank you for responses.