Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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,
 
Report 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.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<JG>
posted
Sorry, should have said, 7.7.0.1
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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-2020 Information Builders