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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] PDF Coordinated Compound Layout Report Question with trailing pages

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] PDF Coordinated Compound Layout Report Question with trailing pages
 Login/Join
 
Member
posted
Hello FocalPoint,

We have another request from a customer for their custom invoice output. We had it all set and they came back with additional specs that I can't seem to get a handle on how to do it. Before I create an official case with IBI support, I thought I would see if the Focal Point community could come up with a solution.

I've put together an example using the car file. I'm using car models as invoice numbers so it makes more sense as an invoice report. Basically, we need a page for each 'Batch-Invoice-Refvalue' combination. We run the report by batch. So as you can see in my example, I'm running it for Batch #5. Within that batch there are four invoices. Within each invoice, only Invoice # 1020, has multiple refvalues.

The way the customer would like the invoices to print is that pages 2 & 3 only show up at the end of the invoice. So most of the invoices only have one refvalue so the last two pages of text show up at the end. In the case of Invoice #1020, they want five pages to show up and then the last two text pages to show up and then continue on to the next invoice. The way the report is written right now, the last two text pages show up after each unique refvalue number. Does anyone out there have any ideas of how to do this with the PDF Coordinated Compound Layout in Webfocus? In the end, the report should be 18 pages long.

Also, before this request, we just hard coded the page numbers onto the report for each page (ie.. 1 of 3, 2 of 3, 3 of 3) but now they want the page numbers to reset after each invoice. So in the case of Invoice #1020, they want to have the pages be 1 of 7, etc.. . We might be able to come up with a solution for the page numbers but if anyone has any solution for that as well, it would be appreciated.

Thanks,

Keith


-* Default Mode: ResourceLayout

SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET NODATA = ''
SET BYDISPLAY = ON
SET EMPTYREPORT = ON
SET PAGE-NUM = NOPAGE
SET HTMLARCHIVE = ON
SET ONLINE-FMT = PDF


-*TABLE FILE CAR
-*PRINT *
-*BY CAR
-*END
-*-EXIT


-*? HOLD CAR
-*-EXIT


-*Change the 'Batch' here by changing the value in the 'Seats' field
-SET &SEATS_NO= 5;



DEFINE FILE CAR
BATCH/A3=FPRINT(SEATS,'I3',BATCH);
INVOICE_NUM/I4=DECODE CAR('ALFA ROMEO' 1000 'AUDI' 1010 'BMW' 1020 'DATSUN' 1030 'JAGUAR' 1040 'JENSEN' 1050 'MASERATI' 1060 'PEUGEOT' 1070 'TOYOTA' 1080 'TRIUMPH' 1090);
INVOICE/A4=FPRINT(INVOICE_NUM,'I4',INVOICE);
REFVALUE_1/I5=SALES+LENGTH+WIDTH+HEIGHT;
REFVALUE/A5=FPRINT(REFVALUE_1,'I5',REFVALUE);
BATCH_INVOICE_REFVALUE/A50=BATCH||'_'||INVOICE||'_'||REFVALUE ;
END

TABLE FILE CAR
PRINT *
BATCH
INVOICE
REFVALUE_1
REFVALUE
BATCH_INVOICE_REFVALUE
BY BATCH_INVOICE_REFVALUE
ON TABLE HOLD AS BJ_CAR
END


COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=BILLABLE_INVOICE, LAYOUT=ON, MERGE=ON, $

PAGELAYOUT=1,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
COMPONENT='INVOICE_01',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 3),$
COMPONENT='INVOICE_02',TYPE=REPORT,POSITION=(1 5), DIMENSION=(4 2),$

PAGELAYOUT=2,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
COMPONENT='FRENCH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$

PAGELAYOUT=3,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
COMPONENT='ENGLISH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
END


SET COMPONENT='INVOICE_01'
TABLE FILE BJ_CAR
HEADING
"<13>BATCH ID:"<14>INVOICE #:"<18>REF VALUE: ""
"<15>COUNTRY:"<16>CAR: "<17>MODEL: ""
"<5>BY FIELD VALUE:BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
type=report,line=2,style=bold,color=blue,$
ENDSTYLE
END

-*
SET COMPONENT='INVOICE_02'
TABLE FILE BJ_CAR
HEADING
"<17>DEALER COST:"<17>RETAIL COST:"<17>SALES:BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
ENDSTYLE
END

SET COMPONENT='FRENCH_NOTE'
TABLE FILE BJ_CAR
HEADING
"French General Terms of Sale"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
ENDSTYLE
END

SET COMPONENT='ENGLISH_NOTE'
TABLE FILE BJ_CAR
HEADING
"English General Terms of Sale"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
ENDSTYLE
END

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.104
Windows, All Outputs
 
Posts: 28 | Location: Holland, MI USA | Registered: September 30, 2010Report This Post
Virtuoso
posted Hide Post
kfreers,

Your sample code is not working.

Also, when pasting sample and/or code, please use the code tag (last icon on ribbon) :
</>


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Martin,
Thanks for the heads up. I'm not sure what went wrong. Try this code instead:

SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET NODATA = ''
SET BYDISPLAY = ON
SET EMPTYREPORT = ON
SET PAGE-NUM = NOPAGE
SET HTMLARCHIVE = ON
SET ONLINE-FMT = PDF


-*TABLE FILE CAR
-*PRINT *
-*BY CAR
-*END
-*-EXIT


-*? HOLD CAR
-*-EXIT


-*Change the 'Batch' here by changing the value in the 'Seats' field
-SET &SEATS_NO= 5;




DEFINE FILE CAR
BATCH/A3=FPRINT(SEATS,'I3',BATCH);
INVOICE_NUM/I4=DECODE CAR('ALFA ROMEO' 1000 'AUDI' 1010 'BMW' 1020 'DATSUN' 1030 'JAGUAR' 1040 'JENSEN' 1050 'MASERATI' 1060 'PEUGEOT' 1070 'TOYOTA' 1080 'TRIUMPH' 1090);
INVOICE/A4=FPRINT(INVOICE_NUM,'I4',INVOICE);
REFVALUE_1/I5=SALES+LENGTH+WIDTH+HEIGHT;
REFVALUE/A5=FPRINT(REFVALUE_1,'I5',REFVALUE);
BATCH_INVOICE_REFVALUE/A50=BATCH||'_'||INVOICE||'_'||REFVALUE ;
END

TABLE FILE CAR
PRINT *
BATCH
INVOICE
REFVALUE_1
REFVALUE
BATCH_INVOICE_REFVALUE
BY BATCH_INVOICE_REFVALUE
ON TABLE HOLD AS BJ_CAR
END


COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=BILLABLE_INVOICE, LAYOUT=ON, MERGE=ON, $

PAGELAYOUT=1,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='INVOICE_01',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 3),$
	COMPONENT='INVOICE_02',TYPE=REPORT,POSITION=(1 5), DIMENSION=(4 2),$

PAGELAYOUT=2,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='FRENCH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$

PAGELAYOUT=3,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='ENGLISH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
END


SET COMPONENT='INVOICE_01'
TABLE FILE BJ_CAR
HEADING
"<13>BATCH ID:<BATCH"
"<14>INVOICE #:<INVOICE"
"<18>REF VALUE: <REFVALUE"
""
"<15>COUNTRY:<COUNTRY"
"<16>CAR: <CAR"
"<17>MODEL: <MODEL"
""
"<5>BY FIELD VALUE:<BATCH_INVOICE_REFVALUE"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
type=report,line=2,style=bold,color=blue,$
ENDSTYLE
END

-*
SET COMPONENT='INVOICE_02'
TABLE FILE BJ_CAR
HEADING
"<17>DEALER COST:<DEALER_COST"
"<17>RETAIL COST:<RETAIL_COST"
"<17>SALES:<SALES"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
ENDSTYLE
END

SET COMPONENT='FRENCH_NOTE'
TABLE FILE BJ_CAR
HEADING
"French General Terms of Sale"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
ENDSTYLE
END

SET COMPONENT='ENGLISH_NOTE'
TABLE FILE BJ_CAR
HEADING
"English General Terms of Sale"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ  &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
type=report,size=7,$
ENDSTYLE
END

  


WebFOCUS 8.104
Windows, All Outputs
 
Posts: 28 | Location: Holland, MI USA | Registered: September 30, 2010Report This Post
Virtuoso
posted Hide Post
Not yet what you are looking for, but closer...
SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET NODATA = ''
SET BYDISPLAY = ON
SET EMPTYREPORT = ON
SET PAGE-NUM = NOPAGE
SET HTMLARCHIVE = ON
SET ONLINE-FMT = PDF
-SET &SEATS_NO= 5;

DEFINE FILE CAR
BATCH/A3=FPRINT(SEATS,'I3',BATCH);
INVOICE_NUM/I4=DECODE CAR('ALFA ROMEO' 1000 'AUDI' 1010 'BMW' 1020 'DATSUN' 1030 'JAGUAR' 1040 'JENSEN' 1050 'MASERATI' 1060 'PEUGEOT' 1070 'TOYOTA' 1080 'TRIUMPH' 1090);
INVOICE/A4=FPRINT(INVOICE_NUM,'I4',INVOICE);
REFVALUE_1/I5=SALES+LENGTH+WIDTH+HEIGHT;
REFVALUE/A5=FPRINT(REFVALUE_1,'I5',REFVALUE);
BATCH_INVOICE_REFVALUE/A50=BATCH||'_'||INVOICE||'_'||REFVALUE;
BATCH_INVOICE/A50=BATCH||'_'||INVOICE;
END
TABLE FILE CAR
PRINT *
BATCH
INVOICE
REFVALUE_1
REFVALUE
-*BATCH_INVOICE
-*BATCH_INVOICE_REFVALUE
BY BATCH_INVOICE
BY BATCH_INVOICE_REFVALUE
ON TABLE HOLD AS BJ_CAR
END
-RUN

COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=BILLABLE_INVOICE, LAYOUT=ON, MERGE=ON, $
PAGELAYOUT=1,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='INVOICE_01',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 3),$
	COMPONENT='INVOICE_02',TYPE=REPORT,POSITION=(1 5), DIMENSION=(4 2),$
PAGELAYOUT=2,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='FRENCH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
PAGELAYOUT=3,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='ENGLISH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
END

SET COMPONENT='INVOICE_01'
TABLE FILE BJ_CAR
HEADING
"<13>BATCH ID:<BATCH"
"<14>INVOICE #:<INVOICE"
"<18>REF VALUE: <REFVALUE"
""
"<15>COUNTRY:<COUNTRY"
"<16>CAR: <CAR"
"<17>MODEL: <MODEL"
""
"<5>BY FIELD VALUE:<BATCH_INVOICE_REFVALUE"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
TYPE=REPORT,LINE=2,STYLE=BOLD,COLOR=BLUE,$
ENDSTYLE
END

SET COMPONENT='INVOICE_02'
TABLE FILE BJ_CAR
HEADING
"<17>DEALER COST:<DEALER_COST"
"<17>RETAIL COST:<RETAIL_COST"
"<17>SALES:<SALES"
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END

SET COMPONENT='FRENCH_NOTE'
TABLE FILE BJ_CAR
HEADING
"French General Terms of Sale"
BY BATCH_INVOICE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END

SET COMPONENT='ENGLISH_NOTE'
TABLE FILE BJ_CAR
HEADING
"English General Terms of Sale"
BY BATCH_INVOICE NOPRINT REPAGE
WHERE SEATS EQ  &SEATS_NO;
ON BATCH_INVOICE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Martin,

I think you were on the right path by adding the BY statements to the hold file. I also added the following BY Statement to each component : BY BATCH_INVOICE NOPRINT and it gave me exactly what I wanted. Thanks for help! Smiler I was close but with what you changed got me there.

Any thoughts on the page numbering since we are on a roll?

Thanks,

Keith

SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET NODATA = ''
SET BYDISPLAY = ON
SET EMPTYREPORT = ON
SET PAGE-NUM = NOPAGE
SET HTMLARCHIVE = ON
SET ONLINE-FMT = PDF
-SET &SEATS_NO= 5;

DEFINE FILE CAR
BATCH/A3=FPRINT(SEATS,'I3',BATCH);
INVOICE_NUM/I4=DECODE CAR('ALFA ROMEO' 1000 'AUDI' 1010 'BMW' 1020 'DATSUN' 1030 'JAGUAR' 1040 'JENSEN' 1050 'MASERATI' 1060 'PEUGEOT' 1070 'TOYOTA' 1080 'TRIUMPH' 1090);
INVOICE/A4=FPRINT(INVOICE_NUM,'I4',INVOICE);
REFVALUE_1/I5=SALES+LENGTH+WIDTH+HEIGHT;
REFVALUE/A5=FPRINT(REFVALUE_1,'I5',REFVALUE);
BATCH_INVOICE_REFVALUE/A50=BATCH||'_'||INVOICE||'_'||REFVALUE;
BATCH_INVOICE/A50=BATCH||'_'||INVOICE;
END
TABLE FILE CAR
PRINT *
BATCH
INVOICE
REFVALUE_1
REFVALUE
-*BATCH_INVOICE
-*BATCH_INVOICE_REFVALUE
BY BATCH_INVOICE
BY BATCH_INVOICE_REFVALUE
ON TABLE HOLD AS BJ_CAR
END
-RUN

COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=BILLABLE_INVOICE, LAYOUT=ON, MERGE=ON, $
PAGELAYOUT=1,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='INVOICE_01',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 3),$
	COMPONENT='INVOICE_02',TYPE=REPORT,POSITION=(1 5), DIMENSION=(4 2),$
PAGELAYOUT=2,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='FRENCH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
PAGELAYOUT=3,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='ENGLISH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
END

SET COMPONENT='INVOICE_01'
TABLE FILE BJ_CAR
HEADING
"<13>BATCH ID:<BATCH"
"<14>INVOICE #:<INVOICE"
"<18>REF VALUE: <REFVALUE"
""
"<15>COUNTRY:<COUNTRY"
"<16>CAR: <CAR"
"<17>MODEL: <MODEL"
""
"<5>BY FIELD VALUE:<BATCH_INVOICE_REFVALUE"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
TYPE=REPORT,LINE=2,STYLE=BOLD,COLOR=BLUE,$
ENDSTYLE
END

SET COMPONENT='INVOICE_02'
TABLE FILE BJ_CAR
HEADING
"<17>DEALER COST:<DEALER_COST"
"<17>RETAIL COST:<RETAIL_COST"
"<17>SALES:<SALES"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE_REFVALUE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END

SET COMPONENT='FRENCH_NOTE'
TABLE FILE BJ_CAR
HEADING
"French General Terms of Sale"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE NOPRINT REPAGE
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END

SET COMPONENT='ENGLISH_NOTE'
TABLE FILE BJ_CAR
HEADING
"English General Terms of Sale"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE NOPRINT REPAGE
WHERE SEATS EQ  &SEATS_NO;
ON BATCH_INVOICE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END
  


WebFOCUS 8.104
Windows, All Outputs
 
Posts: 28 | Location: Holland, MI USA | Registered: September 30, 2010Report This Post
Virtuoso
posted Hide Post
May be still not yet exactly what you're looking for, but at least each invoice has its own page numbering.
Note:
1- French and English terms pages are not counted as page number.
2- You have one extra English terms page at the end. Haven't found why : yours to figure.
3- You don't have the "Page X of XX". To have it in that format, you will probably have to count manually the page number and total pages to then display it yourself and not use WF automatic page numbering.

SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET NODATA = ''
SET BYDISPLAY = ON
SET EMPTYREPORT = ON
SET PAGE-NUM = NOPAGE
SET HTMLARCHIVE = ON
SET ONLINE-FMT = PDF
-SET &SEATS_NO= 5;

DEFINE FILE CAR
BATCH/A3=FPRINT(SEATS,'I3',BATCH);
INVOICE_NUM/I4=DECODE CAR('ALFA ROMEO' 1000 'AUDI' 1010 'BMW' 1020 'DATSUN' 1030 'JAGUAR' 1040 'JENSEN' 1050 'MASERATI' 1060 'PEUGEOT' 1070 'TOYOTA' 1080 'TRIUMPH' 1090);
INVOICE/A4=FPRINT(INVOICE_NUM,'I4',INVOICE);
REFVALUE_1/I5=SALES+LENGTH+WIDTH+HEIGHT;
REFVALUE/A5=FPRINT(REFVALUE_1,'I5',REFVALUE);
BATCH_INVOICE_REFVALUE/A50=BATCH||'_'||INVOICE||'_'||REFVALUE;
BATCH_INVOICE/A50=BATCH||'_'||INVOICE;
END
TABLE FILE CAR
PRINT *
BATCH
INVOICE
REFVALUE_1
REFVALUE
BY BATCH_INVOICE
BY BATCH_INVOICE_REFVALUE
ON TABLE HOLD AS BJ_CAR
END
-RUN

COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=BILLABLE_INVOICE, LAYOUT=ON, MERGE=ON, $
PAGELAYOUT=1,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='INVOICE_01',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 3),$
	COMPONENT='INVOICE_02',TYPE=REPORT,POSITION=(1 5), DIMENSION=(4 2),$
PAGELAYOUT=2,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='FRENCH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
PAGELAYOUT=3,TOPMARGIN=0.1, RIGHTMARGIN=0.1, LEFTMARGIN=0.1,BOTTOMMARGIN=0.1, $
               OBJECT=BOX,POSITION=(.1 .1),DIMENSION=(8.3 10.8),border-color=black,$
	COMPONENT='ENGLISH_NOTE',TYPE=REPORT,POSITION=(1 1), DIMENSION=(7 2),$
END

SET COMPONENT='INVOICE_01'
TABLE FILE BJ_CAR
BY  BJ_CAR.BJ_CAR.BATCH_INVOICE NOPRINT REPAGE
BY  BJ_CAR.BJ_CAR.BATCH_INVOICE_REFVALUE NOPRINT

ON BJ_CAR.BJ_CAR.BATCH_INVOICE_REFVALUE PAGE-BREAK
HEADING
"<13>BATCH ID:<BATCH"
"<14>INVOICE #:<INVOICE"
"<18>REF VALUE: <REFVALUE"
" "
"<15>COUNTRY:<COUNTRY"
"<16>CAR: <CAR"
"<17>MODEL: <MODEL"
" "
"<5>BY FIELD VALUE:<BATCH_INVOICE_REFVALUE"
WHERE SEATS EQ &SEATS_NO;
-*ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM ON
ON TABLE NOTOTAL
ON TABLE SET STYLE *
$
TYPE=REPORT,
     SIZE=7,
$
TYPE=REPORT,
     LINE=2,
     COLOR='BLUE',
     STYLE=BOLD,
$
ENDSTYLE
END
SET COMPONENT='INVOICE_02'
TABLE FILE BJ_CAR
HEADING
"<17>DEALER COST:<DEALER_COST"
"<17>RETAIL COST:<RETAIL_COST"
"<17>SALES:<SALES"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE_REFVALUE NOPRINT
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE_REFVALUE PAGE-BREAK
-*ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END

SET COMPONENT='FRENCH_NOTE'
TABLE FILE BJ_CAR
HEADING
"French General Terms of Sale"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE NOPRINT
WHERE SEATS EQ &SEATS_NO;
ON BATCH_INVOICE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
-*ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END

SET COMPONENT='ENGLISH_NOTE'
TABLE FILE BJ_CAR
HEADING
"English General Terms of Sale"
BY BATCH_INVOICE NOPRINT
BY BATCH_INVOICE NOPRINT
WHERE SEATS EQ  &SEATS_NO;
ON BATCH_INVOICE PAGE-BREAK
ON TABLE SET EMPTYREPORT OFF
-*ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=7,$
ENDSTYLE
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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     [SOLVED] PDF Coordinated Compound Layout Report Question with trailing pages

Copyright © 1996-2020 Information Builders