Focal Point
open space in across table

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

April 12, 2005, 08:24 AM
Pete
open space in across table
Hi ,


I'm trying to give the empty cell in my across table another color.

for example


xxxxxxx 2001 2002 2003

PORSCHE 3 4 8
AUDI 3 1 10
VW 2 2 2

I'm holding my file as an HTML TABLE

and i can't seem to color the xxxxx spot

so if anybody has an idea .......


Thanks

Pete
April 12, 2005, 11:31 AM
<JG>
Try the following, the only problem is that it inserts a 0 into what would have been an empty cell



SET HOLDLIST=PRINTONLY
SET ASNAMES=ON
TABLE FILE CAR
SUM SEATS
ACROSS COUNTRY NOPRINT
BY MODEL
ON TABLE HOLD AS XX FORMAT ALPHA
END
CHECK FILE XX HOLD
-RUN
-*
TABLEF FILE HOLD
PRINT
COMPUTE FN/A20= EDIT(ALIAS,'999') ;
COMPUTE FT/A20=' AS ' | '''' || EDIT(FIELDNAME,'$$$9999999999') || '''';

WHERE FLDNO NE 1
ON TABLE HOLD AS FIELDS FORMAT ALPHA
END
-RUN
-*
TABLE FILE CAR
BY MODEL
ON TABLE HOLD AS ZZ FORMAT ALPHA
END
-RUN
TABLEF FILE FIELDS
PRINT
COMPUTE COUNTA/I5= LAST COUNTA +1; NOPRINT
COMPUTE COUNTER/I9= COUNTA -1; NOPRINT
COMPUTE STYLE/A100='TYPE=DATA, COLUMN=' || FN ||',BACKCOLOR=RED,WHEN=' || FN | ' EQ 0, $';
ON TABLE HOLD AS CELLF FORMAT ALPHA
END
-RUN
TABLE FILE XX
SUM
-INCLUDE FIELDS
BY MODEL
ON TABLE SET STYLE *
-INCLUDE CELLF
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,
April 12, 2005, 03:21 PM
<Pietro De Santis>
Pete,

Providing an example that runs on all WebFOCUS environments would help us help you.

Here is an example that might be doing what you need. Unfortunately I used DevStudio to create it, so the code is unnecessarily long.

Basically, if I understand correctly, you would like to use a background colour for the column title of your BY field. Unfortunately, the background colour styling will only work if there's text in the column title - if you have AS '' to remove the text, then you cannot have a background colour. So, simply make the column title text colour and background color the same.

The particular code in the example:

TYPE=TITLE, COLUMN=N1, COLOR=RGB(255 0 128), BACKCOLOR=RGB(255 0 128), $

Example:

TABLE FILE CAR
SUM
SEATS
BY
BODYTYPE
ACROSS
COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
$
TYPE=DATA,
COLUMN=N1,
BACKCOLOR=RGB(0 128 255),
$
TYPE=TITLE,
COLUMN=N1,
COLOR=RGB(255 0 128),
BACKCOLOR=RGB(255 0 128),
$
TYPE=ACROSSVALUE,
BACKCOLOR='BLUE',
$
TYPE=ACROSSTITLE,
BACKCOLOR='RED',
$
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,
April 12, 2005, 07:49 PM
<JG>
Sorry Pete,
After reading Pietro's post and re reading yours, I gave you an answer for a question you did not ask.

The particular cell that you want to change can not be accessed as Pietro says and in inverse approach as suggested is your best option.
April 13, 2005, 01:56 PM
Pete
thanks for the input so far ,guys

But you are right LG , i can't change the cell i want with Pietro's code

what do you mean by inversed?
April 13, 2005, 02:03 PM
<JG>
By inversed I mean because you cannot change that one cell, change all of the others instead.
Tthat way you have the effect of it being different.
April 13, 2005, 07:08 PM
susannah
i use that wasted real estate in an across table with a table overlay, with a z-index and absolute positioning.
cheating, i know, html only, i know, but you might be able to use the idea.

-HTMLFORM BEGIN

!IBI.FIL.MYTAB;
style="border-collapse: collapse; font-family:MS Sans Serif; font-size:8.5pt;color:#4A484B;position: absolute;left: 20; top: 65; z-index: 1 ">

some label goes here



-HTMLFORM END

This message has been edited. Last edited by: <Mabel>,