Focal Point
[SOLVED] Styling report in InfoAssist

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

June 22, 2020, 01:13 PM
Martin vK
[SOLVED] Styling report in InfoAssist
I want to do styling in InfoAssist to give certain rows a different background. I add this line of code to the styling:
TYPE=DATA, BACKCOLOR=RGB(225 225 225), WHEN=N6 EQ 'J', $ 

Unfortunately InfoAssist keeps changing it to the following:
TYPE=DATA, COLUMN=N6, BACKCOLOR=RGB(225 225 225), WHEN=N6 EQ 'J', $ 

which only applies to column N6 which is also a NOPRINT column that is only needed for the WHEN in the conditional styling, so does not have any effect at all.

Does someone have a solution or workaround how I can accomplish this in InfoAssist, or will it just not allow me to do this kind of conditional styling?

thanks, Martin.

This message has been edited. Last edited by: Martin vK,


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
June 22, 2020, 02:06 PM
BabakNYC
In InfoAssist, you'll have to create 3 macros for this condition and apply them to each column separately. Something like this:
  
DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=N3 GT 5000, $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=N3 GT 5000, $
DEFMACRO=Condition_3, MACTYPE=RULE, WHEN=N3 GT 5000, $
TYPE=DATA, COLUMN=N1, MACRO=Condition_1, FONT='ARIAL', SIZE=12, COLOR=RGB(255 255 255), STYLE=BOLD, HYPERLINK-COLOR=RGB(255 255 255), BACKCOLOR=(RGB(255 0 0) RGB(255 0 0)), $
TYPE=DATA, COLUMN=N2, MACRO=Condition_2, FONT='ARIAL', SIZE=12, COLOR=RGB(255 255 255), STYLE=BOLD, HYPERLINK-COLOR=RGB(255 255 255), BACKCOLOR=(RGB(255 0 0) RGB(255 0 0)), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_3, FONT='ARIAL', SIZE=12, COLOR=RGB(255 255 255), STYLE=BOLD, HYPERLINK-COLOR=RGB(255 255 255), BACKCOLOR=(RGB(255 0 0) RGB(255 0 0)), $



But I think in App Studio you can create one macro and apply it to the whole row. This is how you can apply the same condition to different columns generated by App Studio:
  
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=N3 GT 5000,
$
TYPE=DATA,
     COLUMN=N3,
     COLOR='WHITE',
     BACKCOLOR='RED',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N2,
     COLOR='WHITE',
     BACKCOLOR='RED',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N1,
     COLOR='WHITE',
     BACKCOLOR='RED',
     MACRO=COND0001,
$

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


WebFOCUS 8206, Unix, Windows
June 22, 2020, 02:16 PM
Martin vK
Thanks. I already figured this would be the workaround. You can not apply styling to a row so you have to apply same styling to each column separately.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
June 23, 2020, 08:15 AM
MartinY
quote:
Originally posted by Martin vK:
You can not apply styling to a row so you have to apply same styling to each column separately.

Omit the COLUMN=Nx, row such as below and it will be applied to the whole row
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     DEFMACRO=COND_RED,
     MACTYPE=RULE,
     WHEN=N3 GT 5100,
$
     DEFMACRO=COND_BLUE,
     MACTYPE=RULE,
     WHEN=N3 LT 5100,
$
     DEFMACRO=COND_GREEN,
     MACTYPE=RULE,
     WHEN=N3 EQ 5100,
$
TYPE=DATA,
     COLOR='WHITE',
     BACKCOLOR='RED',
     MACRO=COND_RED,
$
TYPE=DATA,
     COLOR='WHITE',
     BACKCOLOR='BLUE',
     MACRO=COND_BLUE,
$
TYPE=DATA,
     COLOR='WHITE',
     BACKCOLOR='GREEN',
     MACRO=COND_GREEN,
$
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
June 23, 2020, 08:43 AM
Martin vK
This apparently does not work in InfoAssist, you can only apply styling to columns not to rows.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster