Focal Point
[CLOSED] Background color of a column

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

April 22, 2009, 02:10 PM
krishkasi
[CLOSED] Background color of a column
Hi All,
Greetings.
I am trying to generate a PDF report where I need to have the back ground color of a column spanned to a limited width and height.

TABLE FILE CAR
PRINT
COUNTRY
CAR
SEAT
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE= REPORT,SIZE=8,$
TYPE= TITLE, BORDER=MEDIUM,$
TYPE= DATA, BORDER=MEDIUM, TOPGAP=0.1, BOTTOMGAP=0.1,$
ENDSTYLE
END

In this case, the back ground color is applied to the whole column. But my need is to specify the back ground only on a specific width and height of the column. Can this be achieved?
Thanks in advance.

This message has been edited. Last edited by: Kerry,


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
April 22, 2009, 02:34 PM
<JG>
The example does not contain a background colour.

For example

TYPE=DATA, COLUMN=P3,BACKCOLOR=RED,$
April 22, 2009, 02:41 PM
krishkasi
I apologize.

TABLE FILE CAR
PRINT
COUNTRY
CAR
SEAT
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE= REPORT,SIZE=8,$
TYPE= TITLE, BORDER=MEDIUM,$
TYPE= DATA, BORDER=MEDIUM, TOPGAP=0.1, BOTTOMGAP=0.1,$
TYPE= DATA, COLUMN = N3, BACKCOLOR=RGB(50 50 230),$
ENDSTYLE
END

is there anyway, we can apply the back ground colour only on a specific width and height inside the column.


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
April 22, 2009, 02:59 PM
<JG>
No the background colour will fill the cell.

Even in PDF you must regard a particular data element as a cell.
April 22, 2009, 03:22 PM
Tom Flynn
  
TABLE FILE CAR
SUM
    RETAIL_COST AS 'Retail Cost'
    DEALER_COST AS 'Dealer Cost'
        COMPUTE XPCT/P6.2B% = (RETAIL_COST / DEALER_COST) * 100; AS '%'
    SALES       AS 'Sales'
BY COUNTRY AS 'Country'
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
     LEFTMARGIN  = 0.550000,
     RIGHTMARGIN = 0.250000,
     TOPMARGIN   = 0.35000000,
     BOTTOMMARGIN= 0.55000000,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
$
TYPE=REPORT, NAME='TITLE_1', OBJECT=BOX,  POSITION=(0.55 0.90), DIMENSION=(0.95 0.20), BACKCOLOR=RED,$
ENDSTYLE
END
-RUN




Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 22, 2009, 03:50 PM
krishkasi
Thanks JG and Tom.

Tom,
My reports runs into multiple rows and pages. i want to apply this logic to a coilumn value in all the rows. can you please advise how to do it?


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
April 22, 2009, 03:58 PM
Tom Flynn
JG correctly answered your question, although, this will answer your "new" criteria:

  
TABLE FILE CAR
SUM
    RETAIL_COST AS 'Retail Cost'
    DEALER_COST AS 'Dealer Cost'
        COMPUTE XPCT/P6.2B% = (RETAIL_COST / DEALER_COST) * 100; AS '%'
    SALES       AS 'Sales'
BY COUNTRY AS 'Country'
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
     LEFTMARGIN  = 0.550000,
     RIGHTMARGIN = 0.250000,
     TOPMARGIN   = 0.35000000,
     BOTTOMMARGIN= 0.55000000,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
$
TYPE=DATA, COLUMN=COUNTRY, BORDER=ON, BACKCOLOR=RED, WHEN=COUNTRY EQ 'JAPAN',$
ENDSTYLE
END
-RUN




Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 22, 2009, 04:03 PM
krishkasi
So no way to do it. Backcolor is the nly option But it will fill the entire width and heigh of the column.


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
April 22, 2009, 04:05 PM
Tom Flynn
It fills the entire width and height of the "cell", not column.

Again, if that's not what you want, then, see JG's response...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 22, 2009, 04:07 PM
<JG>
Correct, Tom's solution gives a variation on conditional styling but nothing more.

Total cell or nothing.
April 22, 2009, 04:09 PM
Tom Flynn
Alright JG,

You and T. Ashford are replying w/o signing in:

What's the secret????

Tom

EDIT:

My 1st example does highlight an "area" only, not a "cell".

The 2nd stated that you were correct(and I agreed) in your response.
The criteria changed, as usual...Just wanted to set the record straight.

The "BOX"ing is great when creating unique forms and other creative outputs...FYI

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 22, 2009, 04:34 PM
<JG>
quote:
What's the secret????


You have to sign in, profile options give you the option of not being visible.

look at the count of named and signed in.
April 22, 2009, 04:41 PM
Tom Flynn
AHA!!!!

Wasn't looking at the count!!!

Now, everyone will do it, we'll all be Ghosts in the Machine...

THX!! Smiler

P.S.

I'll delete mine when you delete yours...

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 22, 2009, 05:26 PM
<JG>
My choice, why should a member be any different from a guest.

Big brother and all that etc.

Any response always shows who replied.