Focal Point
Save a graph as image and then display.

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

January 04, 2005, 08:51 AM
Cyril Joy
Save a graph as image and then display.
Hello friends,

When I save a graph as GIF/JPEG and then try to display the same in html/excel, its is not displaying the image.(Saving is working fine). When i type the url for the image, it is displayed but opening as an applet. I doubt this is why it is not displayed when i call the image through fex.

FILEDEF G2 DISK E:\wwwroot\test\G2.GIF

GRAPH FILE TEST
SUM CNT.PROJECT AS PROJECT
ACROSS REGION
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SAVE AS G2 FORMAT GIF
END

TABLE FILE TEST
PRINT PROJECT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, IMAGE=http://<SERVERNAME>/test/G2.GIF, POSITION=(4 0), SIZE=(5 3), $
ENDSTYLE
ON TABLE PCHOLD FORMAT HTML
END

-EXIT

I want the image to be displayed in the Html/Excel.
Please anyone let me know what mistake I am doing.
January 04, 2005, 12:32 PM
<WFUser>
Should work. What release are your running? Make sure you delete the gif and the first part of your request is actually running sucessfully.
January 04, 2005, 04:32 PM
susannah
Cyril, there's a thread #1055 above yours that addresses the same thing. "Adding Image to HTML report". Your syntax, with type=report, works for pdf output.
For web output, you define a text field
that is a long character string containing the URL of the image. Then put that text element whereever you want it in your report, making sure that your webserver (e.g. IIS) can find the image file.
January 04, 2005, 04:41 PM
<WFUser>
Susannah,

I wan't sure either, but I tested this code in 5.3 and it works in HTML.
January 04, 2005, 05:16 PM
susannah
ah! good to know
January 05, 2005, 05:39 AM
Cyril Joy
I am using WebFOCUS 521 Server. The image can be displayed well as the report output if i use an existing gif/jpeg/jpg image. For example using the following command.

TYPE=REPORT, IMAGE=http://<SERVERNAME>/test/logo.GIF, POSITION=(4 0), SIZE=(5 3), $

The problem comes only if i first save a graph file as an image and then try to display that image. The no-image icon will be displayed as the output. But when I right click on the icon and see the properties, it is showing the correct path.(If I use this path in browser, image will be displayed but opened as a java applet even after saving as jpeg or gif)
January 05, 2005, 10:29 AM
susannah
Cyril, are you running in MRE or in self-serv?
January 05, 2005, 11:00 AM
Cyril Joy
I am not running in MRE. I have the WebFOCUS 521 Server and running the fex files using it. To be frank, I just not used that product yet.
January 06, 2005, 01:39 AM
<Kalyan>
Cyril ,
I have not tried what you are doing exactly. But I did create graphical reports. I also faced the problem of the graph loading as applet. Found that using
SET GRAPHEDIT =SERVER

solved the problem.

Dont know if this would help you..

Kalyan.
January 06, 2005, 03:36 AM
Cyril Joy
No kalyan, the image is not getting displayed. Also the image is still opening as an applet.Below is the code I am using.

FILEDEF G2 DISK E:\wwwroot\user\G2.GIF

SET SQLENGINE=SQLORA
SQL SQLORA
SELECT * FROM &USER.TEST_GRAPH&DSN
;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS T_GTEST FORMAT ALPHA
END
-RUN

SET GRAPHEDIT =SERVER

GRAPH FILE T_GTEST
SUM CNT.PROJECT AS PROJECT
ACROSS REGION
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SAVE AS G2 FORMAT GIF
END

TABLE FILE T_GTEST
PRINT PROJECT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, IMAGE=http://server/user/G2.GIF, POSITION=(4 0), SIZE=(5 3), $
ENDSTYLE
ON TABLE PCHOLD FORMAT HTML
END

-EXIT
March 21, 2005, 01:52 PM
Prarie
Did this ever get resolved? I'm having the same problem...5.3.2 Developer Studio.
March 21, 2005, 02:19 PM
<Thiru>
Check with the access permissions on that folder in the server. The folder where you save the GIF files should have the RW access and should be in the application path.
March 21, 2005, 06:18 PM
<mbroxter>
I experienced this same issue in 5.2.3 a few months ago with self-service reports. The problem ended up being that Java WebStart was locking up on the Reporting Server, thus the image was not being created nor was an error being returned. The HTML reports were also showing the correct path, but an empty image.

If you have access to the Reporting Server, start Java Webstart from the desktop to see if it starts OK. My problem ended up being that Java and the video card had a conflict.