Focal Point
[SOLVED] How to : Make a PDF with a fixed part and a flexible part and absolution pos

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

March 28, 2014, 12:03 PM
Dave
[SOLVED] How to : Make a PDF with a fixed part and a flexible part and absolution pos
What the 'h3ll' you mean Dave???

...here we go.

I'd like to:
Make a PDF.

On the first page some tables and graphs. Layout requirements are 2 rows of 4 reports ( absolute positions). Some are tables some are graphs. This page is a kind of "total" page or RECAP.

Then after that page a variable number of pages with similar layout.

So...
First page : Nation wide data
Then, for each store, a similar page.

I think I can not use a Composer document ( coordinated report ) because then I can not have recap.

I though I could use:
SET COMPOUND = OPEN
-INCLUDE RECAP_PAGE.FEX
-LOOP_START

-SET &COMPOUNDCODE = IF &DONE EQ 'TRUE' THEN 'SET COMPOUND = CLOSE' ELSE '';
&COMPOUNDCODE.EVAL

-INCLUDE STORE_PAGE.FEX
-IF &DONE EQ 'TRUE' THEN CONTINUE ELSE GOTO LOOP_START

-* done :-)


With some added code to make sure all stores are handle by the loop. etc. ( it's just sample code ).

We have this working, but NOT with absolute positions.

Problem here is I'd like to make a (non-composer) PDF output with absolute positions.

I already found out how to make this work with graphs.
- make the graphs ( hold as SVG )
- include them in the REPORT style with "POSITION".

...but that doesn't work with tables.

I can do it with tables with HTMLFORM. Just HOLD the tables as HTMTABLE and use HTML to place them... ...but that doesn't work for PDF. ( not even with the unsupported HTMLFORMTYPE = PDF )


....and clues? Frowner


Page 1
Nationwide data
TABLE1 GRAPH1 TABLE2 GRAPH2
TABLE3 GRAPH3 TABLE4 GRAPH4

Page 2
Store data store nr.1
TABLE1 GRAPH1 TABLE2 GRAPH2
TABLE3 GRAPH3 TABLE4 GRAPH4

Page 3
Store data store nr.2
TABLE1 GRAPH1 TABLE2 GRAPH2
TABLE3 GRAPH3 TABLE4 GRAPH4

Page 4
Store data store nr.3
TABLE1 GRAPH1 TABLE2 GRAPH2
TABLE3 GRAPH3 TABLE4 GRAPH4
...
...
...
Page n
Store data store nr.n-1
TABLE1 GRAPH1 TABLE2 GRAPH2
TABLE3 GRAPH3 TABLE4 GRAPH4

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


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 28, 2014, 12:14 PM
j.gross
quote:
I think I can not use a Composer document ( coordinated report ) because then I can not have recap.


Of course you can -- in your hold file(s) to generate the 8 outputs, store Nationwide Recap data as store zero.
March 31, 2014, 05:16 AM
Dave
Thanks J.

I thought of that too... ...but that's an ugly work-around. I was wondering whether WebFocus could do it instead of me doing it in the data. Roll Eyes

...and perferably without using the composer ( we don't get along so well... )


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 31, 2014, 06:49 AM
Tony A
Go on Dave, don't shy away from Composer. The code is quite simple really and using the GUI is also simple.

The includes I have used below are just simple TABLE/GRAPH FILE GGSLAES SUM DOLLARS BUDDOLLARS BY column with a filter on REGION EQ &Region - I actually created it using the composer and then adjusted the top, left, width and height to ensure I had the same values in the right places (my mouse positioning isn't so great Wink)

I also removed some code to make it easier to read (so you know what you'd have to manually code if you wanted to).

-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=A4, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, ORIENTATION=LANDSCAPE, $

COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.497 1.351), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart1', TEXT='chart1', TOC-LEVEL=2, POSITION=(3.415 1.355), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(5.519 1.351), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart2', TEXT='chart2', TOC-LEVEL=2, POSITION=(8.444 1.355), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

COMPONENT='report3', TEXT='report3', TOC-LEVEL=2, POSITION=(0.497 4.688), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart3', TEXT='chart3', TOC-LEVEL=2, POSITION=(3.415 4.685), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

COMPONENT='report4', TEXT='report4', TOC-LEVEL=2, POSITION=(5.524 4.688), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart4', TEXT='chart4', TOC-LEVEL=2, POSITION=(8.444 4.685), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

PAGELAYOUT=2, NAME='Page layout 2', text='Page layout 2', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, ORIENTATION=LANDSCAPE, $

COMPONENT='report5', TEXT='report5', TOC-LEVEL=2, POSITION=(0.497 1.351), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart5', TEXT='chart5', TOC-LEVEL=2, POSITION=(3.415 1.355), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

COMPONENT='report6', TEXT='report6', TOC-LEVEL=2, POSITION=(5.519 1.351), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart6', TEXT='chart6', TOC-LEVEL=2, POSITION=(8.444 1.355), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

COMPONENT='report7', TEXT='report7', TOC-LEVEL=2, POSITION=(0.497 4.688), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart7', TEXT='chart7', TOC-LEVEL=2, POSITION=(3.415 4.685), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

COMPONENT='report8', TEXT='report8', TOC-LEVEL=2, POSITION=(5.524 4.688), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart8', TEXT='chart8', TOC-LEVEL=2, POSITION=(8.444 4.685), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $
END

-SET &Region = 'Northeast';
SET COMPONENT='report1'
-*component_type report
-INCLUDE region_rep.fex
SET COMPONENT='chart1'
-*component_type chart
-INCLUDE region_chart.fex

-SET &Region = 'Southeast';
SET COMPONENT='report2'
-*component_type report
-INCLUDE region_rep.fex
SET COMPONENT='chart2'
-*component_type chart
-INCLUDE region_chart.fex

-SET &Region = 'West';
SET COMPONENT='report3'
-*component_type report
-INCLUDE region_rep.fex
SET COMPONENT='chart3'
-*component_type chart
-INCLUDE region_chart.fex

-SET &Region = 'Midwest';
SET COMPONENT='report4'
-*component_type report
-INCLUDE region_rep.fex
SET COMPONENT='chart4'
-*component_type chart
-INCLUDE region_chart.fex

-SET &Region = 'Northeast';
SET COMPONENT='report5'
-*component_type report
-INCLUDE city_rep.fex
SET COMPONENT='chart5'
-*component_type chart
-INCLUDE city_chart.fex

-SET &Region = 'Southeast';
SET COMPONENT='report6'
-*component_type report
-INCLUDE city_rep.fex
SET COMPONENT='chart6'
-*component_type chart
-INCLUDE city_chart.fex

-SET &Region = 'West';
SET COMPONENT='report7'
-*component_type report
-INCLUDE city_rep.fex
SET COMPONENT='chart7'
-*component_type chart
-INCLUDE city_chart.fex

-SET &Region = 'Midwest';
SET COMPONENT='report8'
-*component_type report
-INCLUDE city_rep.fex
SET COMPONENT='chart8'
-*component_type chart
-INCLUDE city_chart.fex

COMPOUND END

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 31, 2014, 10:06 AM
Tony A
Just a thought but you might be meaning with a variable number of subsequent pages?

If so then try a technique that I've used before, build the two sections of the compound document within dialogue manager code. Here's an example using GGSALES (as usual Wink). The output can be seen here -

SET EMPTYREPORT = ON
TABLE FILE GGSALES
BY CITY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS CITYDATA
END
-RUN

FILEDEF PDF_PART1 DISK PDF_PART1.fex
FILEDEF PDF_PART2 DISK PDF_PART2.fex
-RUN
 
-WRITE PDF_PART1 -DEFAULTH &|Region = 'FOC_NONE'
-WRITE PDF_PART1 SET HTMLARCHIVE=ON
-WRITE PDF_PART1 *-HOLD_SOURCE
-WRITE PDF_PART1 COMPOUND LAYOUT PCHOLD FORMAT PDF
-WRITE PDF_PART1 UNITS=IN, $
-WRITE PDF_PART1 SECTION=section1, LAYOUT=ON, MERGE=OFF, ORIENTATION=LANDSCAPE, PAGESIZE=A4, SHOW_GLOBALFILTER=OFF, $

-* First Page - Nationwide Data
-WRITE PDF_PART1 pagelayout=1, name='Layout page 1', $
-WRITE PDF_PART1 object=string, name='text1', text='Nationwide report - Split by Region', position=(0.5 0.3), dimension=(5.0 0.3), $
-WRITE PDF_PART1 COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.5 0.5), DIMENSION=(2.5 3.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart1', TEXT='chart1', TOC-LEVEL=2, POSITION=(3.5 0.5), DIMENSION=(2.5 2.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(6.0 0.5), DIMENSION=(2.5 3.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart2', TEXT='chart2', TOC-LEVEL=2, POSITION=(9.0 0.5), DIMENSION=(2.5 2.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report3', TEXT='report3', TOC-LEVEL=2, POSITION=(0.5 4.5), DIMENSION=(2.5 3.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart3', TEXT='chart3', TOC-LEVEL=2, POSITION=(3.5 4.5), DIMENSION=(2.5 2.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report4', TEXT='report4', TOC-LEVEL=2, POSITION=(6.0 4.5), DIMENSION=(2.5 3.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart4', TEXT='chart4', TOC-LEVEL=2, POSITION=(9.0 4.5), DIMENSION=(2.5 2.5), COMPONENT-TYPE=GRAPH, $
-WRITE PDF_PART1 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Region = 'Northeast';
-WRITE PDF_PART2 SET COMPONENT='report1'
-WRITE PDF_PART2 -INCLUDE region_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart1'
-WRITE PDF_PART2 -INCLUDE region_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Region = 'Southeast';
-WRITE PDF_PART2 SET COMPONENT='report2'
-WRITE PDF_PART2 -INCLUDE region_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart2'
-WRITE PDF_PART2 -INCLUDE region_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Region = 'West';
-WRITE PDF_PART2 SET COMPONENT='report3'
-WRITE PDF_PART2 -INCLUDE region_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart3'
-WRITE PDF_PART2 -INCLUDE region_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Region = 'Midwest';
-WRITE PDF_PART2 SET COMPONENT='report4'
-WRITE PDF_PART2 -INCLUDE region_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart4'
-WRITE PDF_PART2 -INCLUDE region_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-SET &Cnt = 2;
-READ CITYDATA NOCLOSE &City.A20.
-REPEAT :Loop WHILE &IORETURN EQ 0;
-SET &City = TRUNCATE(&City);
 
-WRITE PDF_PART1 pagelayout=&Cnt.EVAL, name='Layout page &Cnt.EVAL', $
-WRITE PDF_PART1 object=string, name='text1_&Cnt.EVAL', text='Product Report for City: &City.EVAL', position=(0.5 0.3), dimension=(5.0 0.3), $
-WRITE PDF_PART1 COMPONENT='report1_&Cnt.EVAL', TEXT='report1_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(0.5 0.5), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart1_&Cnt.EVAL', TEXT='chart1_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(3.5 0.5), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report2_&Cnt.EVAL', TEXT='report2_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(6.0 0.5), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart2_&Cnt.EVAL', TEXT='chart2_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(9.0 0.5), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report3_&Cnt.EVAL', TEXT='report3_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(0.5 2.25), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart3_&Cnt.EVAL', TEXT='chart3_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(3.5 2.25), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report4_&Cnt.EVAL', TEXT='report4_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(6.0 2.25), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart4_&Cnt.EVAL', TEXT='chart4_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(9.0 2.25), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $
 
-WRITE PDF_PART1 COMPONENT='report5_&Cnt.EVAL', TEXT='report5_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(0.5 4.0), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart5_&Cnt.EVAL', TEXT='chart5_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(3.5 4.0), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report6_&Cnt.EVAL', TEXT='report6_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(6.0 4.0), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart6_&Cnt.EVAL', TEXT='chart6_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(9.0 4.0), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report7_&Cnt.EVAL', TEXT='report7_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(0.5 5.75), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart7_&Cnt.EVAL', TEXT='chart7_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(3.5 5.75), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $

-WRITE PDF_PART1 COMPONENT='report8_&Cnt.EVAL', TEXT='report8_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(6.0 5.75), DIMENSION=(2.5 1.5), BYTOC=0, $
-WRITE PDF_PART1 COMPONENT='chart8_&Cnt.EVAL', TEXT='chart8_&Cnt.EVAL', TOC-LEVEL=2, POSITION=(9.0 5.75), DIMENSION=(2.5 1.5), COMPONENT-TYPE=GRAPH, $
-WRITE PDF_PART1 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-WRITE PDF_PART2 -SET &|City = '&City.EVAL';
-WRITE PDF_PART2 -SET &|Product = 'Biscotti';
-WRITE PDF_PART2 SET COMPONENT='report1_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart1_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = 'Capuccino';
-WRITE PDF_PART2 SET COMPONENT='report2_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart2_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = '''Coffee Grinder'' OR ''Coffee Pot''';
-WRITE PDF_PART2 SET COMPONENT='report3_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart3_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = '''Croissant'' OR ''Scone''';
-WRITE PDF_PART2 SET COMPONENT='report4_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart4_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = 'Espresso';
-WRITE PDF_PART2 SET COMPONENT='report5_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart5_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = 'Latte';
-WRITE PDF_PART2 SET COMPONENT='report6_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart6_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = 'Mug';
-WRITE PDF_PART2 SET COMPONENT='report7_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart7_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-WRITE PDF_PART2 -SET &|Product = 'Thermos';
-WRITE PDF_PART2 SET COMPONENT='report8_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_rep.fex
-WRITE PDF_PART2 SET COMPONENT='chart8_&Cnt.EVAL'
-WRITE PDF_PART2 -INCLUDE city_chart.fex
-WRITE PDF_PART2 -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-READ CITYDATA NOCLOSE &City.A20.
-SET &Cnt = &Cnt + 1;
-:Loop
 
-WRITE PDF_PART1 END
-WRITE PDF_PART2 COMPOUND END
 
CMD COPY PDF_PART1.fex+PDF_PART2.FEX PDF_CONTROL.FEX
-RUN

-*CMD TYPE PDF_CONTROL.FEX
EX PDF_CONTROL




In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 31, 2014, 10:11 AM
Dave
Tony,

Yeah that works.

But I require to start with a RECAP. ( That can be solved with J's solution ).

...and I have to turn this into a dynamic loop. Since I have a variable number of 'detail' pages.

Thanks for the 'lean' version.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 31, 2014, 10:17 AM
Dave
ah.. cross posted...

That's what I mean....
...but yours is a bit elaborate..?

Why go through the trouble of using -WRITE and CMD COPY ( which only works on windows ).?

-LOOP_START1

-SET &POSX = magic_calculation_here;
-SET &POSX2 = magic_calculation_here;
-SET &POSY = magic_calculation_here;

COMPONENT='report&COUNTER', TEXT='report&COUNTER', TOC-LEVEL=2, POSITION=(&POSX &POSY), DIMENSION=(2.400 1.456), BYTOC=0, $
COMPONENT='chart&COUNTER', TEXT='chart&COUNTER', TOC-LEVEL=2, POSITION=(&POSX2 &POSY), DIMENSION=(2.000 1.456), COMPONENT-TYPE=GRAPH, $

-IF DONE EQ 'YES' THEN CONTINUE ELSE GOTO LOOP_START1;



-LOOP_START2

-SET &Region = '&LOOPVALUE';
SET COMPONENT='report&COUNTER'
-*component_type report
-INCLUDE city_rep.fex
SET COMPONENT='chart&COUNTER'
-*component_type chart
-INCLUDE city_chart.fex

-IF DONE EQ 'YES' THEN CONTINUE ELSE GOTO LOOP_START2;


thanks!


_____________________
WF: 8.0.0.9 > going 8.2.0.5
March 31, 2014, 10:28 AM
Tony A
Hi Dave,

Absolutely and I know that is the way that many experienced coders would do it however, I have tried to make it easier to comprehend for all our members that might not have the experience or the confidence with dialogue manager.

As for the CMD COPY, you could use any OS command that achieves the same thing (as you know - but for everyone Wink).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 01, 2014, 12:02 AM
Rifaz
Tony, Can you please tell me, what is the use of BYTOC=0 in compound PDF report?


-Rifaz

WebFOCUS 7.7.x and 8.x
April 01, 2014, 02:58 AM
Dave
@Tony Nice Thread


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 01, 2014, 04:02 AM
Tony A
quote:
what is the use of BYTOC=0 in compound PDF report?

Hi Rifaz,

The BYTOC is the number of BY fields to be shown in the TOC (if you coded one).

It is used in conjunction with TOC-LEVEL=n.

Documentation for 7.7.05 can be found here. You will need to scroll down about two thirds of the document or search on BYTOC.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 01, 2014, 04:11 AM
Tony A
@ Dave,

Smiler Glad I could assist.

@ Everyone,

Apologies for using Dave's lead in as an example, but he has made it concise but with enough detail for anyone who contributes answers to be able to suggest a solution, without having to second guess and continually ask for clarification.

If only all questions were asked in this manner Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 01, 2014, 05:09 AM
Rifaz
Thanks Tony for the doc. It helps Smiler


-Rifaz

WebFOCUS 7.7.x and 8.x
April 01, 2014, 05:22 AM
Tony A
Hi Rifaz,

You're welcome. My preference is to just turn on the Bookmarks section (as opposed to the whole TOC page) by using the following code before the "SECTION" -
OBJECT=BOOKMARKS, $

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 01, 2014, 05:43 AM
Dave
[SOLVED]


_____________________
WF: 8.0.0.9 > going 8.2.0.5