Focal Point
[SOLVED] Outputting checkmark as an image or with a font to PPT

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

August 15, 2017, 01:11 AM
Jason-1
[SOLVED] Outputting checkmark as an image or with a font to PPT
I have a requirement to have a green check mark and red X mark output in a grid report based on values in the data. I have read about this and figured out several ways that work just fine in HTML, but where I am getting tripped up is my report has to be output to PPTX format and it just doesn't work there.

 
TABLE FILE CAR
BY BODYTYPE
BY COMPUTE MARKER/A1 = IF BODYTYPE EQ 'SEDAN' THEN 'a' ELSE 'r'; AS 'Is this a sedan?'
ON TABLE PCHOLD FORMAT PPTX
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=DATA, COLUMN=MARKER, FONT='Webdings',WHEN= MARKER EQ 'a', COLOR=GREEN, $
TYPE=DATA, COLUMN=MARKER, FONT='Webdings',WHEN= MARKER EQ 'r', COLOR=RED, $
END
 


Example -- this uses Webdings font.. lower case 'a' in webdings is a check mark, lower case 'r' is a nice looking X mark. Outputs to HTML just fine, but when I output to PPTX format, it just shows the lower case 'a' and lower case 'r' in Courier New font, not what was specified in the stylesheet. I tried this technique with several different "symbol" fonts and had the same result, no matter what, the PPTX output for that field seems to be in Courier New font. The font are available IN powerpoint, so I can switch the output manually, but that won't work.

I also experimented with using images instead of symbol fonts... and once again, got it to work just fine in HTML, but when outputting to powerpoint it is totally broken.

Doing something with the stylesheet like TYPE=DATA,COLUMN=IMAGER,IMAGE=(IMAGER),SIZE=(15 15),PRESERVERATIO=ON,$ ...imager being a defined field that has the file name of the image. HTML works just fine, it's a nice small image and looks as expected, but when you flip the output over to PPTX what should be a small grid on a single slide becomes a 96 page powerpoint deck with lots of blank slides, broken images, etc.



So -- I've searched the forums and seen a decent amount of discussion on similar topics but most seem to be discussing HTML, PDF, or Excel output... curious to get thoughts on powerpoint output and if there are any suggestions.

Thanks in advance if anyone is able to help -- it would be much appreciated!

Jason

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


WebFOCUS 8009
August 15, 2017, 11:32 AM
BabakNYC
I don't think the WHEN syntax has anything to do with it since the COLOR is coming through properly.

It seems like some fonts are recognized and some aren't. If you change the font to Symbol the PPTX will assign Symbol font but Webdings don't come across. I'd call IB Tech Support to see if they have any idea why this is the case.


WebFOCUS 8206, Unix, Windows
August 16, 2017, 06:09 PM
Michael L Meagher
Maybe it's a code page issue. I cannot get check marks to output to PDF or PPTX no matter which symbolic font I choose.

Did you open a case?


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
August 17, 2017, 10:02 AM
BKinPA
Hi Jason-

We have embedded symbols in reports that are output to PPTX by using image files. In this example, my images are red and green dots instead of checkmarks. This technique came from an 8.1.05 Tech Bulletin so not certain it will work in your version.

TABLE FILE CAR
BY BODYTYPE
BY COMPUTE MARKER/A20 = IF BODYTYPE EQ 'SEDAN' THEN 'green_button.gif' ELSE 'red_button.gif'; AS 'Is this a sedan?'
ON TABLE PCHOLD FORMAT PPTX
ON TABLE SET STYLE *
$
TYPE=DATA, COLUMN=MARKER, IMAGE=(MARKER),SIZE=(.2 .2),$
TYPE=FOOTING,IMAGE='green_button.gif',position=(.122 .055), SIZE=(.2 .2),$
TYPE=FOOTING,LINE=1,ITEM=1,POSITION=.5,$
TYPE=FOOTING,IMAGE='red_button.gif',position=(.122 .33), SIZE=(.2 .2),$
TYPE=FOOTING,LINE=2,ITEM=1,POSITION=.5,$
END
   


Hope this helps!
Barb


WebFocus 8.1.05, 8.2.01
August 17, 2017, 10:28 AM
MartinY
No need for FOOTING

TABLE FILE CAR
BY BODYTYPE
BY COMPUTE MARKER/A20 = IF BODYTYPE EQ 'SEDAN' THEN 'green_button.gif' ELSE 'red_button.gif'; AS 'Is this a sedan?'
ON TABLE PCHOLD FORMAT PPTX
ON TABLE SET STYLE *
$
TYPE=DATA, COLUMN=MARKER, IMAGE=(MARKER),SIZE=(.2 .2),$
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
August 17, 2017, 10:45 AM
Jason-1
quote:
Originally posted by BKinPA:
Hi Jason-

We have embedded symbols in reports that are output to PPTX by using image files. In this example, my images are red and green dots instead of checkmarks. This technique came from an 8.1.05 Tech Bulletin so not certain it will work in your version.

TABLE FILE CAR
BY BODYTYPE
BY COMPUTE MARKER/A20 = IF BODYTYPE EQ 'SEDAN' THEN 'green_button.gif' ELSE 'red_button.gif'; AS 'Is this a sedan?'
ON TABLE PCHOLD FORMAT PPTX
ON TABLE SET STYLE *
$
TYPE=DATA, COLUMN=MARKER, IMAGE=(MARKER),SIZE=(.2 .2),$
TYPE=FOOTING,IMAGE='green_button.gif',position=(.122 .055), SIZE=(.2 .2),$
TYPE=FOOTING,LINE=1,ITEM=1,POSITION=.5,$
TYPE=FOOTING,IMAGE='red_button.gif',position=(.122 .33), SIZE=(.2 .2),$
TYPE=FOOTING,LINE=2,ITEM=1,POSITION=.5,$
END
   


Hope this helps!
Barb


Barb -- thank you! This worked! I had been experimenting with this syntax but apparently hadn't been getting it quite right as this worked for me. Made my day.
Thank you,
Jason


WebFOCUS 8009
August 17, 2017, 10:46 AM
Jason-1
quote:
Originally posted by MartinY:
No need for FOOTING

TABLE FILE CAR
BY BODYTYPE
BY COMPUTE MARKER/A20 = IF BODYTYPE EQ 'SEDAN' THEN 'green_button.gif' ELSE 'red_button.gif'; AS 'Is this a sedan?'
ON TABLE PCHOLD FORMAT PPTX
ON TABLE SET STYLE *
$
TYPE=DATA, COLUMN=MARKER, IMAGE=(MARKER),SIZE=(.2 .2),$
END


This is correct also -- I was experimenting with Barb's code and removed the footing and it still worked just the same without it. Thank you


WebFOCUS 8009
August 17, 2017, 10:47 AM
Jason-1
Follow-up question on the images being output -- is there a way to align them not just in the center but vertically as well? So they are in the middle of whatever cell they are output to?


WebFOCUS 8009
August 17, 2017, 04:03 PM
Francis Mariani
This is unrelated to the image suggestions that were more recently discussed. The original question was concerned with specific font usage.

I just discovered that Calibri is not a valid font for PDF in WebFOCUS 7.7.05 - Developer Studio local reporting server - it works in HTML but displays as Courier in PDF. I dug into the file system and found file C:\ibi\DevStudio77\srv77\wfs\etc\fontuser.xml which states "This is the WebFOCUS user font map file, where users may add their own Type 1 PostScript fonts for use with PDF and PostScript reports" - I assume this may be valid for PowerPoint reports as well. There are detailed instructions on how to add a font family to the file - I haven't yet given this is a try - I find multiple copies of TrueType versions of Calibri on my PC, but no Type 1 PostScript.

I'm not sure why WebFOCUS requires Type 1 PostScript fonts for PDF (and perhaps for PowerPoint).


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 17, 2017, 04:26 PM
Francis Mariani
Calibri works for PDF in WebFOCUS 8.1.05.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server