Focal Point
[CLOSED] GRAPH IN EXCEL

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

August 01, 2009, 04:52 AM
Cati - France
[CLOSED] GRAPH IN EXCEL
I read a lot of post about this subject on this forum and I still can't get the graph in excel.

Here is my test procedure
  
APP HOLD BASEAPP
GRAPH FILE CAR
SUM DCOST
    RCOST
BY COUNTRY
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 400
ON GRAPH SET GRAPHSTYLE *
setCustomDataText(getY1Label(), true);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#,###,###");
ENDSTYLE
ON TABLE HOLD AS mygraph FORMAT JPEG
END
DEFINE FILE CAR
  GRAPH/A100 = '<IMG SRC=mygraph.jpeg>';
END
TABLE FILE CAR
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
FOOTING
"<GRAPH"
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
END

When I run it, mygraph.jpeg is correctly generated in baseapp directory but the image is not displayed in excel and I don't understand why.
SET GRAPHENGINE=GRAPH53
-INCLUDE sauvegarder_un_graphe.fex
-* File sauvegarder_un_graphe.fex
APP HOLD BASEAPP
GRAPH FILE CAR
SUM DCOST
RCOST
BY COUNTRY
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 400
ON GRAPH SET GRAPHSTYLE *
setCustomDataText(getY1Label(), true);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#,###,###");
ENDSTYLE
ON TABLE HOLD AS mygraph FORMAT JPEG
END
DEFINE FILE CAR
GRAPH/A100 = ' ';
END
TABLE FILE CAR
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
FOOTING
"<GRAPH"
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
END
0 NOMBRE D'ENREGISTREMENTS DANS LE GRAPHIQUE=       18  POINTS=      5
JPEG FICHIER ENREGISTRE ...
0(INF32080) NOMBRE D ENREGISTREMENTS DANS LA TABLE=        1  LIGNES=      1
WebFOCUS Version 7.6.7 compiled and linked on Fri Dec  5 13:52:42 EST 2008 (Gen branch767_hotfix:17)


In my configuration, the server is intalled on OS400 in the IFS (location : \home\iadmin\ibi\apps\baseapp)
The client is installed on a windows 2000 server (location : G:\ib_prd\ibi\WebFOCUS76)

Where should I generate the .jpeg (or .gif, ...) to be able to have it in excel ? (I made a lot of tests but I still can't have the graph in the excel sheet).

Thanks for your help.
Catherine

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


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
August 03, 2009, 09:17 AM
Prarie
First why do you have the Graph Engine set to this?

SET GRAPHENGINE=GRAPH53


Can you go to BASEAPP
app and see the Graph open it in Paint or something?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Bonjour,

If I open mygraph.jpg with paint,It works.
If I open a new sheet in Excel and insert mygraph.jpg as an image, it works.
If I open a new document in Word and insert mygraph.jpg as an image, it works.

It does not work only with webfocus !

The option SET GRAPHENGINE=GRAPH53 is automatically generated when I execute the fex.

If you have any idea of the reason why It does not work......

Thank you.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
Since you are on 7.6...wonder why it is saying that. Anyone...doesn't that set the engine to an old version?...or am I thinking of something else. I know when we were in 5.3 something we used to set the GRAPHENGINE=OLD...cause there was a problem...but as we Upgraded that went away.
These are the values. The 53 setting is the 'new' setting.

(FOC32422) VALID VALUES ARE GRAPHENGINE=GRAPH53, GRAPH32, NEW, OR OLD



Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Thanks Ginny...I saw that on the Tech site but did not realize it was the NEW setting. Ok...so that does not solve her problem. The way you have this set up should work in the first example. Make sure syntax is correct
in your define
  IMAGE/A200='<img src=http://yoursever/approot/sys_folder/graphfilex.gif>';[

Thanks, L. I think Cati's problem is that she is on a split environment. The gif is stored in the approot of the reporting server but images must be served from the approot of the client platform which for her is on Windows.

Cati, could you do a shared drive between the Windows box and the reporting server box? You could then APP MAP to that drive and save the image there.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
I got the answer of the french IBI support (via the US support).
What I want to do is not possible with webfocus without using excel templates and macros, that's the answer.

I am dismayed by this answer !

If anybody has already done an excel document with the data and the graph in the same sheet without using an excel template, please post an example.

And if it's in AS400 environment, It is still better !

Thanks in advance.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
Ginny's suggestion could not be done?
Probably not. I have never been able to put a graph in an excel spreadsheet using standard WebFOCUS. Everybody wants to do it so I'm hoping it shows up in the product at some point in time.

Cati, if you use the PDF Layout Painter, you can get the graph to show up in another sheet in the same workbook.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Thanks Prarie and Ginny for answering so fast.

I'm so disappointed. I don't want to use templates and macros, that's one of the reasons why we bought a tool like webfocus !

So if anybody else got the "miracle" solution......

Thanks


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
Maybe this can give you an idea


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe