Focal Point
[CLOSED] Generating a dynamic compound Composer PDF document

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

September 15, 2010, 02:56 PM
<JG>
[CLOSED] Generating a dynamic compound Composer PDF document
Have a play, But remember do not try and open the code in the composer after you've parameterized it.

-SET &P1=1;
-SET &P2=2;
TABLE FILE CAR
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS LOOPFILE
END
-RUN
-SET &LOOPS=&LINES;
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter,  $
UNITS=IN, $

-REPEAT ENDREPEAT1 &LOOPS TIMES
PAGELAYOUT=&P1.EVAL, NAME='Page layout &P1.EVAL', 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='report&P1.EVAL', TEXT='report1', TOC-LEVEL=2, POSITION=(0.625 1.200), DIMENSION=(* *), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.292in; HEIGHT: 4.952in; OVERFLOW: auto; TOP: 1.2in; LEFT: 0.625in', $
OBJECT=IMAGE, NAME='image&P1.EVAL', IMAGE=analyst_logo.gif, POSITION=(0.600 0.600), DIMENSION=(1.875 0.469), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 1.875in; HEIGHT: 0.469in; TOP: 0.6in; LEFT: 0.6in', $

PAGELAYOUT=&P2.EVAL, NAME='Page layout &P2.EVAL', text='Page layout 2', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
OBJECT=IMAGE, NAME='image&P2.EVAL', IMAGE=analyst_logo.gif, POSITION=(0.600 0.600), DIMENSION=(1.875 0.469), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 1.875in; HEIGHT: 0.469in; TOP: 0.6in; LEFT: 0.6in', $
COMPONENT='report&P2.EVAL', TEXT='report2', TOC-LEVEL=2, POSITION=(0.625 1.200), DIMENSION=(7.292 8.842), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.292in; HEIGHT: 8.842in; OVERFLOW: auto; TOP: 1.2in; LEFT: 0.625in', $
-SET &P1=&P1+2;
-SET &P2=&P2+2;
-ENDREPEAT1
END

-SET &P1=1;
-SET &P2=2;
-REPEAT ENDREPEAT2 &LOOPS TIMES
-READ LOOPFILE NOCLOSE &COUNTRY.A10.
SET COMPONENT='report&P1.EVAL'
-*component_type report
TABLE FILE CAR
PRINT
     'CAR.CARREC.MODEL'
BY 'CAR.COMP.CAR'
WHERE COUNTRY EQ '&COUNTRY'
HEADING
"The heading for report 1"
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END
SET COMPONENT='report&P2.EVAL'
-*component_type report
TABLE FILE CAR
PRINT
     'CAR.CARREC.MODEL'
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
WHERE COUNTRY EQ '&COUNTRY'
HEADING
"The heading for report 2<+0> "
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END
-RUN
-SET &P1=&P1+2;
-SET &P2=&P2+2;
-ENDREPEAT2
COMPOUND END
  

This message has been edited. Last edited by: Kerry,
September 15, 2010, 04:59 PM
Waz
What version did you run this on ?

On 7.6.6 and 7.6.9 it crashed the agent.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

September 15, 2010, 05:08 PM
<JG>
Sorry, should have said, 7.7.0.1