Focal Point
Character Fonts

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

October 19, 2007, 03:20 PM
moyer1dl
Character Fonts
I want to create columns that show up and down arrrows (use some kind font like this from windows character map ↓↑) to indicate a gain or a loss. How would I define those chatracters, since I cant just cut and past the symbol into the editor or painter.

Dan Moyer
WF 7.1.1


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
October 19, 2007, 03:33 PM
Leah
You might want to research the internal ascii/uicode representation of the symbols.


Leah
October 19, 2007, 04:57 PM
FrankDutch
You can put these two up and down arrows in a little gif files.
Then define them

DEFINE FILE XXX
UPCHAR/A80=IF PROFIT LT 0 THEN '' ELSE 
'SRC=http://....ibi_html/images/kpi/up.gif>';
DOWNCHAR/A80=IF PROFIT GT 0 THEN '' ELSE 
'SRC=http://...ibi_html/images/kpi/down.gif>';


and use these fields in your FEX.
you can color these images too.

What does not work is using this in PDF!




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

October 19, 2007, 05:07 PM
Leah
quote:
DEFINE FILE XXX
UPCHAR/A80=IF PROFIT LT 0 THEN '' ELSE
'SRC=http://....ibi_html/images/kpi/up.gif>';
DOWNCHAR/A80=IF PROFIT GT 0 THEN '' ELSE
'SRC=http://...ibi_html/images/kpi/down.gif>';



and use these fields in your FEX.
you can color these images too.

What does not work is using this in PDF!


Wonder if this would work in a similar manner as to when I was playing with images:
  -SET &IMAGEFILE = IF &WFFMT EQ 'PDF' OR 'PPT' OR 'EXL2K' THEN '/WF/USERS/IMAGES/NEBRASKA.GIF' ELSE 'app/pic29510.jpg'
...
TYPE=TABHEADING,
     IMAGE=&IMAGEFILE,
     POSITION=(+0.250000 +0.250000),
     SIZE=(3.500000 2.500000),
     IMAGEBREAK=ON,
$
...
Replace 
'SRC=http://...ibi_html/images/kpi/down.gif>'

with something similar.



Leah
October 19, 2007, 05:16 PM
FrankDutch
Yes Leah
that can be done, but the positioning of the image in a pdf report is a **** of a job.
What you did is placing a logo on a fixed place, that does work of course.

btw 841 and 842.....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

October 19, 2007, 06:18 PM
Tony A
Dan,

If you have a single column for that value then you could set the font to symbol and use the characters 173 and 175. But as with any font based solution you would have to be confident that the browser and output could use that font (particularly PDF). I think you would be better off using a graphic from the ibi_html/images folder as suggested by Frank above, and also as suggested in the first reply from Gerry to your initial post. That way it is controlled and served by WF and not the end users machine.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 19, 2007, 07:40 PM
susannah
here's how you get your wee images into pdf:
DEFINE FILE CAR
FLAG/A100=DECODE COUNTRY('ENGLAND'   '\\localhost\images\england.GIF'
 'FRANCE'    '\\localhost\images\france.GIF'
 'W GERMANY' '\\localhost\images\germany.GIF'
 'ITALY'     '\\localhost\images\italy.GIF'
 'JAPAN'     '\\localhost\images\japan.GIF');      
END
-RUN
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY BY FLAG
 BY CAR
 BY MODEL
HEADING
" </4"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, IMAGE=c:\ibi\apps\ibisamp\IWCPOWER.GIF, POSITION=(0 0),   $
type=data, column=flag, image=(flag), size=(.5 .25), preserveratio=on,$
ENDSTYLE
END

or

can you use & # 8595; and & # 8593; for the up and down arrows in your fex? the same way we use blank spaces?(i've spaced out the & and the # to get this board to show the numbers)
You could define an &VAR that is either & # 8595; or the other one, and use that &VAR in your column header
SUM SALES AS 'something &VAR '
?

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 22, 2007, 10:40 AM
moyer1dl
THanks All,

I used the WINgdings fonts in Excel. Is there any fonts that work in PDF.


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
October 23, 2007, 05:32 PM
moyer1dl
Im trying this image thing but its screwing up in PDF. I couldnt understand the styling recomendations susannah gave me.

Any Help

DEFINE FILE HOLD
UPARW/A80=<img src=/EDA/EDASERVE/APPPATH/ibi_samples/y_arrow.gif>';

DNARW/A80=<img src=/EDA/EDASERVE/APPPATH/ibi_samples/r_arrow.gif>';

END
TABLE FILE HOLD
PRINT

COMPUTE VAR1/I5B = COUNTDEC06 - COUNTJUN06; AS 'DEC06,JUN06,COUNT ,VAR'

COMPUTE VAR1A/D12.2B = TIMEDEC06 - TIMEJUN06; AS 'DEC06,JUN06,AMT ,VAR '

COMPUTE PCT1/F7.2B = ( ( COUNTDEC06 / COUNTJUN06 ) - 1 ) * 100; AS '%,CNT,CHG'

COMPUTE PCT1A/F7.2B = ( ( TIMEDEC06 / TIMEJUN06 ) - 1 ) * 100; AS '%,AMT,CHG'

COMPUTE IMAGE/A120 = IF VAR1 GT 0 THEN UPARW ELSE IF VAR1 LT 0 THEN DNARW;
AS 'CNT'

COMPUTE IMAGEA/A120 = IF VAR1A GT 0 THEN UPARW ELSE IF VAR1A LT 0 THEN DNARW;
AS 'AMT'

COMPUTE VAR2/I5B = COUNTJUN07 - COUNTDEC06; AS 'DEC06,JUN07,CNT ,VAR'

COMPUTE VAR2A/D12.2B = TIMEJUN07 - TIMEDEC06; AS 'DEC06,JUN07,AMT,VAR'

COMPUTE PCT1/F7.2B = ( ( COUNTJUN07 / COUNTDEC06 ) - 1 ) * 100; AS '%,CNT,CHG'

COMPUTE PCT1A/F7.2B = ( ( TIMEJUN07 / TIMEDEC06 ) - 1 ) * 100; AS '%,AMT,CHG'

COMPUTE IMAGEB/A120 = IF VAR2 GT 0 THEN UPARW ELSE IF VAR2 LT 0 THEN DNARW;
AS 'CNT'

COMPUTE IMAGEC/A120 = IF VAR2A GT 0 THEN UPARW ELSE IF VAR2A LT 0 THEN DNARW;
AS 'AMT'
BY BASICPLANCOD AS 'PLAN,CODE'
BY BASICRATESCA AS 'RT,SCL'

ON BASICRATESCA SKIP-LINE
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT PDF

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


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
October 23, 2007, 05:52 PM
susannah
dan,first. put code tags around your code, when you post. (and nuke all the style sheet stuff..its irrelevant to your goal)
second, do anything at all with the GRAPHTYPE command and then run it in pdf. it works. aha. that's your clue.
third, just run the code i gave you with whatever images you have.
-s.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 24, 2007, 09:50 AM
moyer1dl
Ok Sushana I Tried it without all the styling but I am just getting the path in the column instead of the image.

DEFINE FILE HOLD

UPARW/A80='<img src=/EDA/EDASERVE/APPPATH/ibi_samples/y_arrow.gif>';



DNARW/A80='<img src=/EDA/EDASERVE/APPPATH/ibi_samples/r_arrow.gif>';


END
TABLE FILE HOLD
PRINT

COMPUTE VAR1/I5B = COUNTDEC06 - COUNTJUN06; AS 'DEC06,JUN06,COUNT ,VAR'

COMPUTE VAR1A/D12.2B = TIMEDEC06 - TIMEJUN06; AS 'DEC06,JUN06,AMT ,VAR '

COMPUTE PCT1/F7.2B = ( ( COUNTDEC06 / COUNTJUN06 ) - 1 ) * 100; AS '%,CNT,CHG'

COMPUTE PCT1A/F7.2B = ( ( TIMEDEC06 / TIMEJUN06 ) - 1 ) * 100; AS '%,AMT,CHG'

COMPUTE IMAGE/A120 = IF VAR1 GT 0 THEN UPARW ELSE IF VAR1 LT 0 THEN DNARW;
AS 'CNT'

COMPUTE IMAGEA/A120 = IF VAR1A GT 0 THEN UPARW ELSE IF VAR1A LT 0 THEN DNARW;
AS 'AMT'

COMPUTE VAR2/I5B = COUNTJUN07 - COUNTDEC06; AS 'DEC06,JUN07,CNT ,VAR'

COMPUTE VAR2A/D12.2B = TIMEJUN07 - TIMEDEC06; AS 'DEC06,JUN07,AMT,VAR'

COMPUTE PCT1/F7.2B = ( ( COUNTJUN07 / COUNTDEC06 ) - 1 ) * 100; AS '%,CNT,CHG'

COMPUTE PCT1A/F7.2B = ( ( TIMEJUN07 / TIMEDEC06 ) - 1 ) * 100; AS '%,AMT,CHG'

COMPUTE IMAGEB/A120 = IF VAR2 GT 0 THEN UPARW ELSE IF VAR2 LT 0 THEN DNARW;
AS 'CNT'

COMPUTE IMAGEC/A120 = IF VAR2A GT 0 THEN UPARW ELSE IF VAR2A LT 0 THEN DNARW;
AS 'AMT'
BY BASICPLANCOD AS 'PLAN,CODE'
BY BASICRATESCA AS 'RT,SCL'

ON BASICRATESCA SKIP-LINE
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT PDF


IBM Main Frame: MVS, FIX, VSAM

Windows SQL

WF 7.7
October 24, 2007, 11:33 AM
Darin Lee
I don't believe you can use the
<img>
tags the same way in PDF reports. This functionality relies on the code placed in the defined field rendering the image at display time in an HTML browser. Since a PDF is displayed in the Adobe Reader, it hasn't a clue what
<img>
is and just displays the contents of the defined field as text.

Susannah's code references the images path in the stylesheet, meaning that it must first find the image, whcih is then "coded" as part of the PDF document. This should work.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
October 24, 2007, 05:23 PM
susannah
yup. that's exactly it




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID