Focal Point
[CLOSED] PDF creation with several pages and several graphs on one page

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

April 19, 2012, 08:10 AM
ArbuYaken
[CLOSED] PDF creation with several pages and several graphs on one page
Hello guys,

I am really despaired so I hope for help. I would like to ask you if anyone can provide me some code to create PDF wtih several pages and several graphs on one page, because my code which I have done, does not work.

My way of working was, that I ve created one table for one page. To create several pages, I have used a loop. This is working, but if the page number is higher than a specific number, WebFocus is crashing.

2nd Problem: On one page I have got 6 graphs as SVG images. Herefore I am using 6 variables. If I am creating the 2nd page, I would like to overwrite the first 6 variables with the new SVG graphs. That is not working! WebFocus is not overwriting, he is taking always the first images from the first page. I have tested and I ve discovered that WebFocus is needing a running stop, but I don't know how to do that.
So I have used for each SVG Graph an own variable(variable1, variable2,...,variable200), but then an overflow is produced.

If someone has got a better way I would be very happy.

Thanks for any help in advance!

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


WebFOCUS 7.6
Windows, All Outputs
April 20, 2012, 05:59 PM
gweller
Look up information on the document composer in Developer Studio.


WebFOCUS 8201M/Windows Platform
April 30, 2012, 08:32 AM
SriAravind
See the below link that shows multiple reports and images in one page which might be useful:

https://gig.genexservices.com/.../source/topic530.htm

Try to work around with this example.


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
May 01, 2012, 12:38 PM
susannah
here's an example using COMPOUND a different way from the topic suggested above.
you create all your .svg files first...
eg: in a loop from 1 to 12, lets say...

EXEC myfex_graf MYGO=&MYGO.QUOTEDSTRING, gonumber = &MYNUMBER , WFFMT=PDF
then all your .svg's will be sitting in your agent directory
so now spit them out, and add a table that is just a regular pdf report.
-*-----------------------------------------------------------------------
SET HTMLARCHIVE = ON
SET ORIENTATION = PORTRAIT
COMPOUND LAYOUT PCHOLD FORMAT PDF
SECTION=section1,LAYOUT=ON,$
PAGELAYOUT=1 ,NAME='Page Layout 1 ', text='Page Layout1',TOC-LEVEL=1 ,
TOPMARGIN=0.1, BOTTOMMARGIN=0.5, LEFTMARGIN=0,RIGHTMARGIN=0 ,$
OBJECT=IMAGE, NAME='image1', IMAGE=nyu2011_bw.gif, POSITION=(0.5 0.1), DIMENSION=(1.885 0.990),$
OBJECT=IMAGE,NAME='hgo1',IMAGE=hgo1.svg,POSITION=(.5 1) ,METADATA='Z-INDEX:201; ',$
OBJECT=IMAGE,NAME='hgo2',IMAGE=hgo2.svg,POSITION=(4.0 1) ,METADATA='Z-INDEX:202; ',$
OBJECT=IMAGE,NAME='hgo3',IMAGE=hgo3.svg,POSITION=(0.5 4.0) ,METADATA='Z-INDEX:203; ',$
OBJECT=IMAGE,NAME='hgo4',IMAGE=hgo4.svg,POSITION=(4.0 4.0) ,METADATA='Z-INDEX:204; ',$
OBJECT=IMAGE,NAME='hgo5',IMAGE=hgo5.svg,POSITION=(0.5 7) ,METADATA='Z-INDEX:205; ',$
OBJECT=IMAGE,NAME='hgo6',IMAGE=hgo6.svg,POSITION=(4.0 7) ,METADATA='Z-INDEX:206; ',$
-* to get the title at top, position=(0 0.1)
COMPONENT='table1',TEXT='table1',TOC-LEVEL=1,POSITION=(0 0.2),DIMENSION=(8 1),
METADATA='Z-INDEX:1; LEFT:0.0in; WIDTH=8.0in; POSITION:absolute; TOP:0.0in; HEIGHT=1.0in',$
-*
pagelayout=2, name='Layout page 2', $
OBJECT=IMAGE,NAME='hgo7',IMAGE=hgo7.svg,POSITION=(.5 1) ,METADATA='Z-INDEX:201; ',$
OBJECT=IMAGE,NAME='hgo8',IMAGE=hgo8.svg,POSITION=(4.0 1) ,METADATA='Z-INDEX:202; ',$
OBJECT=IMAGE,NAME='hgo9',IMAGE=hgo9.svg,POSITION=(0.5 4.0) ,METADATA='Z-INDEX:203; ',$
OBJECT=IMAGE,NAME='hgo10',IMAGE=hgo10.svg,POSITION=(4.0 4.0) ,METADATA='Z-INDEX:204; ',$
OBJECT=IMAGE,NAME='hgo11',IMAGE=hgo11.svg,POSITION=(0.5 7) ,METADATA='Z-INDEX:205; ',$
OBJECT=IMAGE,NAME='hgo12',IMAGE=hgo12.svg,POSITION=(4.0 7) ,METADATA='Z-INDEX:206; ',$
COMPONENT='table2',TEXT='table2',TOC-LEVEL=2,POSITION=(0 0.2),DIMENSION=(8 1),
METADATA='Z-INDEX:1; LEFT:0.0in; WIDTH=8.0in; POSITION:absolute; TOP:0.0in; HEIGHT=1.0in',$
END
-RUN
SET COMPONENT = 'table1'
SET PAGE = NOPAGE
EXEC myfex_report1 WFFMT = 'PDF' , parm2='SOMEVALUE', parm3 = 'SOMEMORE'
-RUN
SET COMPONENT = 'table2'
EXEC myfex_report2 WFFMT = 'PDF', which='REPORT'
-RUN
COMPOUND END
-*------------------
here's the thing... this code can't have any dialog manager in it. it breaks. makes me really mad...
it can have comments
but no DM looping.
so if you don't know how many bits you're going to have, you have to write a huge number of pages, with all the ones you don't need COMMENTED OUT!!!
argh.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID