Focal Point
[CLOSED] Styling attribute for Compute Column After Across

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

September 18, 2019, 12:17 PM
tomatosauce
[CLOSED] Styling attribute for Compute Column After Across
Below is a code that i have to generate a report with a COMPUTE column after ACROSS.

  
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ACROSS BODYTYPE AND COMPUTE NEW= C1 + C3 ;
END


I am not able to find the styling attribute for the column 'NEW'. Would it come under ACROSS or Regular Report ? Styling Option is greyed out in App studio for this particular column. Any help is much appreciated.

This message has been edited. Last edited by: FP Mod Chuck,


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
September 18, 2019, 12:58 PM
pav
Are you talking about the styling for the "NEW" column?
Please have a look below

 
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ACROSS BODYTYPE 
COMPUTE NEW= C1 + C3 ;
ON TABLE SET STYLE *
TYPE=REPORT,COLOR=RED,$
TYPE=REPORT,COLUMN=NEW,COLOR=GREEN,FONT='TIMES NEW ROMAN',SIZE=20,$
ENDSTYLE
END

September 18, 2019, 01:10 PM
tomatosauce
Pav,

Thanks for the reply. I should have made my question more specific.

Your code works fell for styling the Title and data of that 'NEW' column. But in this case, I'm specifically looking for styling Title of the NEW Column.

I tried
TYPE=TITLE,COLUMN=NEW,COLOR=GREEN,FONT='TIMES NEW ROMAN',SIZE=20,$
but it doesn't seem to work.


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
September 18, 2019, 01:27 PM
pav
Hello,
Can you try this and let us know.

SET ACROSSTITLE=SIDE
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ACROSS BODYTYPE 
COMPUTE NEW/I5= C1 + C3; AS 'This is some text!'
ON TABLE SET STYLE *
-*TYPE=REPORT,COLOR=RED,$
TYPE=REPORT,COLUMN=NEW,COLOR=GREEN,FONT='TIMES NEW ROMAN',SIZE=20,$


TYPE=ACROSSVALUE, COLUMN=NEW, STYLE=BOLD, COLOR=BROWN, $ 

ENDSTYLE
END  


Thank You.
September 18, 2019, 01:43 PM
tomatosauce
quote:

TYPE=ACROSSVALUE, COLUMN=NEW, STYLE=BOLD, COLOR=BROWN, $


Seems to work for Color Attributes but no luck with JUSTIFY=CENTER


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
September 18, 2019, 01:55 PM
pav
May be we can handle this in a separate way but I made justify=center by below method.

 
SET SHOWBLANKS = ON
SET ACROSSTITLE=SIDE
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ACROSS BODYTYPE 
COMPUTE NEW/I5= C1 + C3; AS '         text!      '
ON TABLE SET STYLE *
-*TYPE=REPORT,COLOR=RED,$
TYPE=REPORT,COLUMN=NEW,COLOR=GREEN,FONT='TIMES NEW ROMAN',SIZE=20,$


TYPE=ACROSSVALUE, COLUMN=NEW, STYLE=BOLD, COLOR=BROWN, JUSTIFY=RIGHT,$ 

ENDSTYLE
END   

September 18, 2019, 02:15 PM
MartinY
Can you find your proper setting with below ?
SET ACRSVRBTITL  = ON
TABLE FILE CAR
SUM RETAIL_COST AS 'Retail Cost'
BY COUNTRY      AS 'Country'
ACROSS BODYTYPE AS 'Body Type'
COMPUTE NEW= C1 + C3; AS 'New'
ON TABLE SET STYLE *
TYPE=TITLE, COLOR=GREY, $
-* THIS IS TO STYLE THE TITLES OF THE ACROSS
TYPE=ACROSSTITLE,            COLOR=GREEN,  FONT='ARIAL',           SIZE=20, JUSTIFY=CENTER, $
-* THIS IS TO STYLE THE VALUES OF THE ACROSS
TYPE=ACROSSVALUE,            COLOR=ORANGE, FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=LEFT, $
TYPE=ACROSSVALUE,COLUMN=NEW, COLOR=BLUE,   FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=LEFT, $
-* THIS IS TO STYLE THE DATA WHEN ACROSS IS USED OR SPECIFIC TO YOUR CASE
TYPE=DATA,                   COLOR=PINK,   FONT='TIMES NEW ROMAN', SIZE=8,  JUSTIFY=RIGHT, $
-*TYPE=DATA,ACROSSCOLUMN=NEW,  COLOR=RED,    FONT='TIMES NEW ROMAN', SIZE=10, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=NEW,       COLOR=RED,    FONT='TIMES NEW ROMAN', SIZE=10, JUSTIFY=RIGHT, $
ENDSTYLE
END



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
September 19, 2019, 11:29 AM
tomatosauce
Thanks a ton Pav and MartinY.

I was able to achieve it using Martiny's example.


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
September 23, 2019, 11:04 AM
tomatosauce
@Martiny, the code you provided works well for HTML for all styling attributes. However, JUSTIFY=CENTER for the column 'NEW' doesnt seem to work well with XLSX, even though other properties like color , font and background translates well.

   
SET ACRSVRBTITL  = ON
TABLE FILE ibisamp/CAR
SUM RETAIL_COST AS 'Retail Cost'
BY COUNTRY      AS 'Country'
ACROSS BODYTYPE AS 'Body Type'
COMPUTE NEW= C1 + C3; AS 'New'
ON TABLE PCHOLD FORMAT XLSX
ON TABLE SET XLSXPAGESETS ON
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=TITLE, COLOR=GREY,  $
-* THIS IS TO STYLE THE TITLES OF THE ACROSS
TYPE=ACROSSTITLE,            COLOR=GREEN,  FONT='ARIAL',           SIZE=20, JUSTIFY=CENTER, $
-* THIS IS TO STYLE THE VALUES OF THE ACROSS
TYPE=ACROSSVALUE,            COLOR=ORANGE, FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=CENTER, $
TYPE=ACROSSVALUE,COLUMN=NEW, COLOR=BLUE,   FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=CENTER, $
-* THIS IS TO STYLE THE DATA WHEN ACROSS IS USED OR SPECIFIC TO YOUR CASE
TYPE=DATA,                   COLOR=PINK,   FONT='TIMES NEW ROMAN', SIZE=8,  JUSTIFY=RIGHT, $
-*TYPE=DATA,ACROSSCOLUMN=NEW,  COLOR=RED,    FONT='TIMES NEW ROMAN', SIZE=10, JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=NEW,       COLOR=RED,    FONT='TIMES NEW ROMAN', SIZE=10, JUSTIFY=RIGHT, $
ENDSTYLE
END

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


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
September 23, 2019, 11:15 AM
MartinY
Work as expected

SET ACRSVRBTITL  = ON
TABLE FILE ibisamp/CAR
SUM RETAIL_COST AS 'Retail Cost'
BY COUNTRY      AS 'Country'
ACROSS BODYTYPE AS 'Body Type'
COMPUTE NEW= C1 + C3; AS 'New'
ON TABLE PCHOLD FORMAT XLSX
ON TABLE SET XLSXPAGESETS ON
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=TITLE, COLOR=GREY,  $
-* THIS IS TO STYLE THE TITLES OF THE ACROSS
TYPE=ACROSSTITLE,            COLOR=GREEN,  FONT='ARIAL',           SIZE=20, JUSTIFY=CENTER, $
-* THIS IS TO STYLE THE VALUES OF THE ACROSS
TYPE=ACROSSVALUE,            COLOR=ORANGE, FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=CENTER, $
TYPE=ACROSSVALUE,COLUMN=NEW, COLOR=BLUE,   FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=CENTER, $
-* THIS IS TO STYLE THE DATA WHEN ACROSS IS USED OR SPECIFIC TO YOUR CASE
TYPE=DATA,                   COLOR=PINK,   FONT='TIMES NEW ROMAN', SIZE=8,  JUSTIFY=RIGHT, $
TYPE=DATA, COLUMN=NEW,       COLOR=RED,    FONT='TIMES NEW ROMAN', SIZE=10, JUSTIFY=CENTER, $
ENDSTYLE
END


With which WF version is not working ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
September 23, 2019, 11:28 AM
tomatosauce
quote:
Originally posted by MartinY:


TYPE=ACROSSVALUE,COLUMN=NEW, COLOR=BLUE,   FONT='TIMES NEW ROMAN', SIZE=15, JUSTIFY=CENTER, $  /* Not Working, the title 'New' is aligned to right by default*/

TYPE=DATA, COLUMN=NEW,       COLOR=RED,    FONT='TIMES NEW ROMAN', SIZE=10, JUSTIFY=CENTER, $  /* This is working in XLSX for me, data is being justified center*/





I'm on 8.2.05 GEN 93.


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs