September 29, 2017, 09:10 AM
David M [SOLVED] Print compound report to multiple pages
I have a compound report that is printed by setting a cost center (&COSTCENTER) variable. I would like to loop through a list of cost centers, executing the report for each, and creating a PDF with multiple pages. I am just getting one page with one cost center. I've tried using SET COMPOUND=OPEN/SET COMPOUND=CLOSE.
This is my looping fex.
-DEFAULTH &DIRECTOR = '_FOC_NULL'
-DEFAULTH &COSTCENTER = '_FOC_NULL'
-DEFAULTH &CC = '_FOC_NULL'
TABLE FILE VWCOSTCENTERATTRIBUTES
PRINT
COSTCENTER AS 'CC'
WHERE DIRECTOR EQ &DIRECTOR;
ON TABLE HOLD AS CENTERS FORMAT ALPHA
END
-RUN
-REPEAT :ENDREPEAT1 FOR &I FROM 1 TO &LINES
-READFILE CENTERS
-SET &CC.&I = &CC ;
-SET &COSTCENTER='''' | &CC.&I | '''';
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Compound.fex
-:ENDREPEAT1
This is my compound report.
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
*-HOLD_SOURCE
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=.5, TOPMARGIN=.5, METADATA='BOTTOMMARGIN=.5,TOPMARGIN=.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(5.100 3.563), DIMENSION=(2.750 0.980), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 5.1in; top: 3.563in; width: 2.75in; height: 0.98in; position: absolute; z-index: 1;', $
COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(-4.558 +1.832), DIMENSION=(* *), RELATIVE-TO='report1', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT, BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.542in; top: 6.375in; width: 7.25in; height: 1.666in; position: absolute; z-index: 2;', $
COMPONENT='report3', TEXT='report3', TOC-LEVEL=2, POSITION=(5.100 4.583), DIMENSION=(2.750 0.772), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 5.1in; top: 4.583in; width: 2.75in; height: 0.772in; position: absolute; z-index: 3;', $
COMPONENT='report4', TEXT='report4', TOC-LEVEL=2, POSITION=(1.906 0.542), DIMENSION=(4.590 1.707), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 1.906in; top: 0.542in; width: 4.59in; height: 1.707in; position: absolute; z-index: 4;', $
COMPONENT='report5', TEXT='report5', TOC-LEVEL=2, POSITION=(0.800 3.781), DIMENSION=(3.229 2.000), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.8in; top: 3.781in; width: 3.229in; height: 2in; position: absolute; z-index: 5;', $
COMPONENT='report6', TEXT='report6', TOC-LEVEL=2, POSITION=(0.800 2.552), DIMENSION=(3.503 1.302), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.8in; top: 2.552in; width: 3.503in; height: 1.302in; position: absolute; z-index: 6;', $
COMPONENT='report7', TEXT='report7', TOC-LEVEL=2, POSITION=(1.948 1.260), DIMENSION=(4.699 1.201), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 1.948in; top: 1.26in; width: 4.699in; height: 1.201in; position: absolute; z-index: 7;', $
COMPONENT='report8', TEXT='report8', TOC-LEVEL=2, POSITION=(5.100 2.521), DIMENSION=(2.750 1.113), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 5.1in; top: 2.521in; width: 2.75in; height: 1.113in; position: absolute; z-index: 8;', $
OBJECT=IMAGE, NAME='image1', IMAGE=NFI_Logo.JPG, ALT='', POSITION=(0.521 0.531), DIMENSION=(1.200 0.600), METADATA='left: 0.521in; top: 0.531in; width: 1.2in; height: 0.6in; position: absolute; z-index: 9; rtFileName=/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/NFI_Logo.JPG', $
COMPONENT='report9', TEXT='report9', TOC-LEVEL=2, POSITION=(0.800 4.979), DIMENSION=(3.684 1.437), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.8in; top: 4.979in; width: 3.684in; height: 1.437in; position: absolute; z-index: 10;', $
COMPONENT='report10', TEXT='report10', TOC-LEVEL=2, POSITION=(5.100 5.385), DIMENSION=(2.750 1.032), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 5.1in; top: 5.385in; width: 2.75in; height: 1.032in; position: absolute; z-index: 10;', $
END
SET COMPONENT='report1'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_OptInput_Grp3.fex
SET COMPONENT='report2'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_OpsInput_Grp1.fex
SET COMPONENT='report3'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_OpsInput_Grp2.fex
SET COMPONENT='report4'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review.fex
SET COMPONENT='report5'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Backhauls.fex
SET COMPONENT='report6'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Asset_Util.fex
SET COMPONENT='report7'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Financials.fex
SET COMPONENT='report8'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Driver_Stats.fex
SET COMPONENT='report9'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Trc_Perf.fex
SET COMPONENT='report10'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/NFI_Dedicated/Operations/TransMetrics/IncomeExpense/Rpt_Operations_Review_Receivables.fex
COMPOUND END
This message has been edited. Last edited by: David M , October 16, 2017 03:01 PM