We have a requirement to create a number of Graphs as PNG files and return them directly to user's browser as PNGs.
When you SAVE or HOLD the graph you get just the PNG file but when PCHOLDing the graph you get the PNG along with a HTML page that included the Image Map.
We could potentially consume the HTML page and extract the PNG file but what we really want to do is to just return the PNG file directly without the overhead of the MAP.
Anyone ever done this? I'm hoping it is just a SET command but haven't found the right one yet.
Cheers
StuThis message has been edited. Last edited by: StuBouyer,
WebFOCUS 8.2.03 (8.2.06 in testing)
September 02, 2015, 03:28 AM
Waz
Have you tried setting HTMLFORMTYPE to PNG and use -HTMLFORM {ddname} pointing to the PNG file.
May not work, but .....
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 02, 2015, 03:42 AM
Tony A
How about using EDAGET?
GRAPH FILE GGSALES
SUM DOLLARS
BY REGION
ON GRAPH HOLD AS GRAPH1 FORMAT PNG
END
-RUN
EX EDAGET PNG,GRAPH1.PNG,B
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
September 02, 2015, 03:48 AM
Waz
Another forgotten gem
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 02, 2015, 09:05 PM
StuBouyer
Thanks Tony and Waz,
I had tried -HTMLFORM and that was going to the last resort as it still wraps extra HTML code around the image itself.
Fortunately EX EDAGET send the raw PNG without any extra baggage to be stripped of.
One note for the curious, if you are running this through WF8 content area then change EX to EXEC or add -MRNOEDIT before EX EDAGET.
Thanks
Stu
WebFOCUS 8.2.03 (8.2.06 in testing)
September 02, 2015, 09:19 PM
Waz
Yes, anything in the content area is scanned for -INCLUDE or EX, because it wants to find all fexes to ship to the WebFOCUS server for execution.