Focal Point
[SOLVED] PDF GRAPH WORKS AS ADHOC BUT NOT IN MRE

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

July 28, 2011, 12:53 PM
vaayu
[SOLVED] PDF GRAPH WORKS AS ADHOC BUT NOT IN MRE
I have a simple graph in pdf which works outside MRE but won't when I'm in MRE.
 GRAPH FILE CAR
SUM SALES BY COUNTRY
ON GRAPH HOLD AS SALESGRAPH FORMAT SVG
END
TABLE FILE CAR
SUM COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,IMAGE=SALESGRAPH,$
ENDSTYLE
END 

0 NUMBER OF RECORDS IN GRAPH= 18 PLOT POINTS= 5
SVG FILE SAVED ...
0 ERROR AT OR NEAR LINE 11 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC3315) IMAGE FILE NOT FOUND: salesgraph.gif

Appreciate the help


Any ideas?

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


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
July 28, 2011, 01:20 PM
Amar
hey,

why don't you try use below code before GRAPH FILE CAR.

APP HOLD C758760


WebFOCUS 7.6.4, Mainframe Focus
Mainframe / Z/OS,MVS
Managed Reporting / Windows
All formats
July 28, 2011, 01:27 PM
Amar
Or Try this as well. Hope it works.

GRAPH FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS SALESGRAPH FORMAT GIF
END
-RUN

TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,IMAGE=SALESGRAPH,$
ENDSTYLE
END


WebFOCUS 7.6.4, Mainframe Focus
Mainframe / Z/OS,MVS
Managed Reporting / Windows
All formats
July 28, 2011, 01:33 PM
vaayu
I tried the gif and it gave a message in pdf
"GIF output is not supported by the JVM in headless mode"

I am not sure how to use APP HOLD for the image. Please give me a sample. The wf client is on AIX.
July 28, 2011, 01:37 PM
vaayu
Even when I change it to PNG it still looks for .gif..

That is strange...

0 NUMBER OF RECORDS IN GRAPH= 18 PLOT POINTS= 5
PNG FILE SAVED ...
0 ERROR AT OR NEAR LINE 11 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC3315) IMAGE FILE NOT FOUND: salesgraph.gif
July 28, 2011, 02:13 PM
vaayu
Well, The users want to be able to create when they login to MRE so there isn't really a self service setup. All the development is on MRE domains.

Thanks and pls let me know
July 28, 2011, 02:15 PM
Tom Flynn
Use MRE as a portal:

Put your code in a fex on your APP PATH, i.e., BASEAPP.

Then, in your MRE fex, call the program:

-MRNOEDIT -INCLUDE baseapp/focexec_name

Graphs and Images have to be in the Other Folder in the MRE Domain; can't be done dynamically...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
July 28, 2011, 03:05 PM
Tom Flynn
You will have to train them on Document Composer.

Create REPORT1 and GRAPH1 as separate reports, OR, they can create them on the fly:

REPORT1:


TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT,FONT='ARIAL', SIZE=8,$
ENDSTYLE
END


GRAPH1:


GRAPH FILE CAR
SUM SALES
BY COUNTRY
ON GRAPH SET PAGE-NUM OFF
END
-RUN



Then, in Document Composer, Reference Existing Procedure:

-* File Graph1_Report1
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^1', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(3.438 0.938), DIMENSION=(4.479 3.125), METADATA='Z-INDEX: 100; LEFT: 3.438in; OVERFLOW: auto; WIDTH: 4.479in; POSITION: absolute; TOP: 0.938in; HEIGHT: 3.125in', $
COMPONENT='report3', TEXT='report3', TOC-LEVEL=2, POSITION=(0.729 0.938), DIMENSION=(2.604 2.708), METADATA='Z-INDEX: 100; LEFT: 0.729in; OVERFLOW: auto; WIDTH: 2.604in; POSITION: absolute; TOP: 0.938in; HEIGHT: 2.708in', $
END
SET COMPONENT='report2'
-*component_type report
-INCLUDE financet/app/graph1.fex
SET COMPONENT='report3'
-*component_type report
-INCLUDE financet/app/report1.fex
COMPOUND END

Again, you can actually create a Report and Graph in Document Composer once opened.

Good Luck!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
July 29, 2011, 12:22 PM
krishkasi
Hi Vaayu,
Tried your code from MRE and added the .SVG extension (IMAGE=SALESGRAPH.SVG) to the saved graph file. It worked. Hope this works.
 
GRAPH FILE CAR
SUM SALES BY COUNTRY
ON GRAPH HOLD AS SALESGRAPH FORMAT SVG
END
TABLE FILE CAR
SUM COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,IMAGE=SALESGRAPH.SVG,$
ENDSTYLE
END 
 



Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
July 29, 2011, 02:43 PM
vaayu
Thank you Kasi. I will try this,