Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Generating a dynamic compound Composer PDF document
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Generating a dynamic compound Composer PDF document
 Login/Join
 
<JG>
posted
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,
 
Reply With QuoteReport This Post
Expert
posted Hide Post
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.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6105 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
<JG>
posted
Sorry, should have said, 7.7.0.1
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Generating a dynamic compound Composer PDF document

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.