Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

This is a follow-up to my previous post on installing traffi...


Ben Maxwell

Recommended Posts

This is a follow-up to my previous post on installing traffic light icons into reports.

When using this code I am see different results based on the output type.

Code used is "<span style=color : green;> &|#x1F311;

HTML output is

XLXS output is '<span style=color : green;> &|#x1F311;

XLS output is

HTML comes out exactly as desired, XLXS totally brings back nothing, and XLS is close but not quite right.

Any suggestions on how I can make the Excel outputs looks like the HTML

Link to comment
Share on other sites

You can go with wingding or other font, for example:

TABLE FILE ibisamp/ggsales

SUM UNITS

COMPUTE CIRCLE/A2 = CHAR(108); AS ''

BY REGION

ON TABLE PCHOLD FORMAT XLSX

ON TABLE SET STYLE *

TYPE=DATA, COLUMN=CIRCLE, SIZE=10, JUSTIFY=CENTER, FONT=WINGDINGS, $

TYPE=DATA, COLUMN=CIRCLE, WHEN=UNITS GE 930000, COLOR=GREEN, $

TYPE=DATA, COLUMN=CIRCLE, WHEN=UNITS LT 930000, COLOR=RED, $

ENDSTYLE

END

 

Use this code to see get a table of possible characters for different fonts and outputs:

-DEFAULT &Font = 'WINGDINGS';

-DEFAULT &WFFMT = 'HTML';

 

SET PAGE=NOLEAD,ACROSSLINE=SKIP

 

DEFINE FILE ibisamp/ggsales

SEQ10/I2 = MOD(SEQ_NO, 10);

SEQROW/I4 = SEQ - SEQ10;

END

 

TABLE FILE ibisamp/ggsales

SUM SEQ_NO NOPRINT

COMPUTE char/A1 = CHAR(SEQ_NO); AS ''

BY SEQROW AS ''

ACROSS SEQ10 AS ''

WHERE SEQ_NO FROM 32 TO 255

ON TABLE PCHOLD FORMAT &WFFMT

ON TABLE SET STYLE *

TYPE=REPORT, SIZE=11, ORIENTATION=LANDSCAPE, BORDER=LIGHT, BORDER-COLOR=RGB(220 220 220), $

TYPE=ACROSSVALUE, FONT=ARIAL, BACKCOLOR=RGB(245 245 245), $

TYPE=DATA, SIZE=11, FONT=&Font, JUSTIFY=CENTER,$

TYPE=DATA, COLUMN=N1, SIZE=11, FONT=ARIAL, BACKCOLOR=RGB(245 245 245), $

ENDSTYLE

END

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...