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     mailing labels - page break

Read-Only Read-Only Topic
Go
Search
Notify
Tools
mailing labels - page break
 Login/Join
 
Platinum Member
posted
We're having two issues with mailing labels. 1. The business would like us to start a fresh page of mailing labels when we change relationship codes. The page-break feature is not working and I believe it's because the system figures each label is a new page. Has anyone figured out a way around this?

2. The other issue is they want a header at the top of the page. In essense right above the labels. I can't seem to get that to work. I have been able to create the first label to be the header, but they would prefer the header at the top of the page (they want the relationship code at the top so they know who to send the labels to).

Here is the code:

SET LINES=999999

DEFINE FILE MAILING_LABELS_VIEW
AU/A10=IF MAILING_TYPE_ID EQ 1 THEN EMPL_COST_CENTER ELSE ' ';
END

TABLE FILE MAILING_LABELS_VIEW
BY REL_SEI_CD NOPRINT
BY MAILING_TYPE_DESCR NOPRINT
BY RECIP_INTRO NOPRINT
BY RECIP_FIRST_NM NOPRINT
BY RECIP_LAST_NM NOPRINT
BY RECIP_TITLE NOPRINT
BY RECIP_OTHER_NM NOPRINT
BY ADDR_LINE1 NOPRINT
BY ADDR_LINE2 NOPRINT
BY ADDR_LINE3 NOPRINT
BY ADDR_LINE4 NOPRINT
BY ADDR_CITY NOPRINT
BY ADDR_STATE_PROV_SHORT_DESCR NOPRINT
BY ADDR_POSTAL_CD NOPRINT
BY AU NOPRINT

WHERE REL_SEI_CD IN ('!DAVE','12THM')
-* this is for the overall heading and what we want to page break on to a new sheet of labels
ON REL_SEI_CD PAGE-BREAK AND SUBHEAD
" "
"" "
" "
" "
" "
" "
" "

ON ADDR_LINE1 PAGE-BREAK

ON TABLE SET NODATA ' '

ON ADDR_LINE1 SUBHEAD
"<25>"
ON ADDR_LINE1 SUBHEAD
"WHEN RECIP_TITLE IS NOT MISSING

ON ADDR_LINE1 SUBHEAD
"WHEN RECIP_OTHER_NM IS NOT MISSING

ON ADDR_LINE1 SUBHEAD
"WHEN ADDR_LINE1 IS NOT MISSING

ON ADDR_LINE2 SUBHEAD
"WHEN ADDR_LINE2 IS NOT MISSING

ON ADDR_LINE3 SUBHEAD
"WHEN ADDR_LINE3 IS NOT MISSING

ON ADDR_LINE4 SUBHEAD
"WHEN ADDR_LINE4 IS NOT MISSING

ON ADDR_CITY SUBHEAD
"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT PDF

ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.152778,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.500000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
PAGEMATRIX=(2 5),
ELEMENT=(4.000000 2.000000),
GUTTER=(0.180556 0.000000),
MATRIXORDER=HORIZONTAL,
$
LABELNAME=AVERY 5163 ADDRESS,
LABELPROMPT=OFF,
$


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
Hi Pam,

Here's an example using the CAR file. This will print labels two across and three down(six per page). You get a page break when the country code changes(this would be your relationship code).

SET PAGE-NUM=NOPAGE
SET NODATA=''
-*
TABLE FILE CAR
PRINT
MODEL
BY COUNTRY
BY CAR
ON TABLE HOLD AS HLD_LBLS
END
-*
DEFINE FILE HLD_LBLS
CNTR/I6 = CNTR + 1;
COU_CNTR/I6 = IF COUNTRY EQ LAST COUNTRY THEN COU_CNTR + 1 ELSE 1;
T_LINE1/A36 = '************************************';
T_LINE2/A36 = 'CNT: ' | EDIT(COU_CNTR) | '/' | EDIT(CNTR);
T_LINE3/A36 = 'COU: ' | COUNTRY;
T_LINE4/A36 = 'CAR: ' | CAR;
T_LINE5/A36 = 'MOD: ' | MODEL;
T_LINE6/A36 = '************************************';
XCOU/I4 = IF COUNTRY EQ LAST COUNTRY THEN XCOU ELSE XCOU + 1;
XLBL/I4 = IF ( (XCOU NE LAST XCOU) OR (XLBL EQ 6) ) THEN 1 ELSE XLBL + 1;
XPAG/I4 = IF XCOU NE LAST XCOU THEN 1 ELSE (IF XLBL EQ 1 THEN XPAG + 1 ELSE XPAG);
XCOL/I4 = IF ( (XLBL EQ 1) OR (XCOL EQ 2) ) THEN 1 ELSE XCOL + 1;
XROW/I4 = IF XLBL EQ 1 THEN 1 ELSE (IF XCOL EQ 1 THEN XROW + 1 ELSE XROW);
END
-*
TABLE FILE HLD_LBLS
HEADING
"COUNTRY: PAGE: "
SUM T_LINE1 AS ''
OVER T_LINE2 AS ''
OVER T_LINE3 AS ''
OVER T_LINE4 AS ''
OVER T_LINE5 AS ''
OVER T_LINE6 AS ''
BY XCOU NOPRINT
BY COUNTRY NOPRINT
BY XPAG NOPRINT
BY XROW NOPRINT
ACROSS XCOL NOPRINT
ON XPAG PAGE-BREAK
ON XROW SUBHEAD
" "
ON XROW SUBFOOT
" "
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
LEFTMARGIN=0.152778,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.100000,
BOTTOMMARGIN=0.000000,
ORIENTATION=PORTRAIT,
$
TYPE=SUBHEAD, SIZE=5, TOPGAP=0.1800, $
TYPE=SUBFOOT, SIZE=5, TOPGAP=0.7200, $
ENDSTYLE
END

Take a look and let me know if this might work.

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Platinum Member
posted Hide Post
Pam,

I just noticed the heading above did not post correctly. The following is what it should be but you need to replace the # with the "less than" sign.

HEADING
"COUNTRY: #COUNTRY #68 PAGE: #LST.XPAG"

I only printed six labels per page because the CAR file only had one country with more than six records and I wanted to make sure it would page break after six. There's also a trick to squeeze out blank lines in the label if you would need to do that.

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Platinum Member
posted Hide Post
what is the trick to squeeze out blank lines. I've done similar things before but if you have cut and dried code I would love to use it.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
quote:
HEADING
"COUNTRY: #COUNTRY #68 PAGE: #LST.XPAG"


how come you use lst.xpag? It works but I don't understand why it works. If we just use xpag we get the wrong results but why would you want the last xpag found instead of the first one found?

Plus, the business wants page 1 of 2 (WITHIN COUNTRY in your case ... so they don't want the total number of pages for the whole report they want the total number of pages within the relationship code) and I've been playing around for a while to get the "max" page numbers within the country but it doesn't want to work. Is it because it's in a heading or because I'm doing something wrong Smiler


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
I figured out the page 1 of max page numbering (I believe) by adding in another sum. Here is the code (I didn't include all of it since it's mentioned above).

TABLE FILE HLD_LBLS
HEADING
"COUNTRY: SUM MAX.XPAG NOPRINT BY XCOU NOPRINT BY COUNTRY NOPRINT
SUM T_LINE1 AS ''
OVER T_LINE2 AS ''
OVER T_LINE3 AS ''
OVER T_LINE4 AS ''
OVER T_LINE5 AS ''
OVER T_LINE6 AS ''
OVER XPAG
BY XCOU NOPRINT
BY COUNTRY NOPRINT
BY XPAG NOPRINT
BY XROW NOPRINT
ACROSS XCOL NOPRINT
ON XPAG PAGE-BREAK


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
Hi Pam,

I'll start with the code for squeezing out blank lines. I'm assuming you are still using the example I sent using the CAR file.

First, change T_LINE5 as follows to create a dummy blank line(only for the second label in each group):

-*T_LINE5/A36 = 'MOD: ' | MODEL;
T_LINE5/A36 = IF COU_CNTR EQ 2 THEN ' ' ELSE 'MOD: ' | MODEL;

Next, here is the code to squeeze out the blank lines:
-*
-** THIS WILL SQUEEZE OUT BLANK LINES
-*
T_XL1/A37 = IF T_LINE1 EQ ' ' THEN ' ' ELSE T_LINE1 | 'X';
T_XL2/A37 = IF T_LINE2 EQ ' ' THEN ' ' ELSE T_LINE2 | 'X';
T_XL3/A37 = IF T_LINE3 EQ ' ' THEN ' ' ELSE T_LINE3 | 'X';
T_XL4/A37 = IF T_LINE4 EQ ' ' THEN ' ' ELSE T_LINE4 | 'X';
T_XL5/A37 = IF T_LINE5 EQ ' ' THEN ' ' ELSE T_LINE5 | 'X';
T_XL6/A37 = IF T_LINE6 EQ ' ' THEN ' ' ELSE T_LINE6 | 'X';
T_ONELINE/A222 = T_XL1 || T_XL2 || T_XL3 || T_XL4 || T_XL5 || T_XL6;
T_NL1/A36 = SUBSTR(222,T_ONELINE,1,37,36,T_NL1);
T_NL2/A36 = SUBSTR(222,T_ONELINE,38,74,36,T_NL2);
T_NL3/A36 = SUBSTR(222,T_ONELINE,75,111,36,T_NL3);
T_NL4/A36 = SUBSTR(222,T_ONELINE,112,148,36,T_NL4);
T_NL5/A36 = SUBSTR(222,T_ONELINE,149,185,36,T_NL5);
T_NL6/A36 = SUBSTR(222,T_ONELINE,186,222,36,T_NL6);
-*

Last, use the T_NLx fields instead of the T_LINEx fields when printing the labels.

Let me know if this works.

Jim


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Platinum Member
posted Hide Post
I had seen this code but it has a comment that if the total of your concatenated fields is greater than 256 it won't work. We have 9 fields of 60 characters, so I didn't even try it. I ended up doing it the long way.

T_LINE2/A80 = XNAME1 | EMPL_COST_CENTER;
T_LINE3/A60 = IF RECIP_TITLE NE ' ' THEN RECIP_TITLE ELSE
IF RECIP_OTHER_NM NE ' ' THEN RECIP_OTHER_NM ELSE
IF ADDR_LINE1 NE ' ' THEN ADDR_LINE1 ELSE
IF ADDR_LINE2 NE ' ' THEN ADDR_LINE2 ELSE
IF ADDR_LINE3 NE ' ' THEN ADDR_LINE3 ELSE
IF ADDR_LINE4 NE ' ' THEN ADDR_LINE4 ELSE
CITY;
T_LINE4/A60 = IF (T_LINE3 NE RECIP_OTHER_NM AND RECIP_OTHER_NM NE ' ') THEN RECIP_OTHER_NM
ELSE IF (T_LINE3 NE ADDR_LINE1 AND ADDR_LINE1 NE ' ') THEN ADDR_LINE1
ELSE IF (T_LINE3 NE ADDR_LINE2 AND ADDR_LINE2 NE ' ') THEN ADDR_LINE2
ELSE IF (T_LINE3 NE ADDR_LINE3 AND ADDR_LINE3 NE ' ') THEN ADDR_LINE3
ELSE IF (T_LINE3 NE ADDR_LINE4 AND ADDR_LINE4 NE ' ') THEN ADDR_LINE4
ELSE IF (T_LINE3 NE CITY AND CITY NE ' ') THEN CITY ELSE ' ';
T_LINE5/A60 = IF (T_LINE4 NE ADDR_LINE1 AND ADDR_LINE1 NE ' ') THEN ADDR_LINE1
ELSE IF (T_LINE4 NE ADDR_LINE2 AND ADDR_LINE2 NE ' ') THEN ADDR_LINE2
ELSE IF (T_LINE4 NE ADDR_LINE3 AND ADDR_LINE3 NE ' ') THEN ADDR_LINE3
ELSE IF (T_LINE4 NE ADDR_LINE4 AND ADDR_LINE4 NE ' ') THEN ADDR_LINE4
ELSE IF (T_LINE4 NE CITY AND CITY NE ' ') THEN CITY ELSE ' ';
T_LINE6/A60 = IF (T_LINE5 NE ADDR_LINE2 AND ADDR_LINE2 NE ' ') THEN ADDR_LINE2
ELSE IF (T_LINE5 NE ADDR_LINE3 AND ADDR_LINE3 NE ' ') THEN ADDR_LINE3
ELSE IF (T_LINE5 NE ADDR_LINE4 AND ADDR_LINE4 NE ' ') THEN ADDR_LINE4
ELSE IF (T_LINE4 NE CITY AND T_LINE5 NE CITY) AND CITY NE ' ' THEN CITY ELSE ' ';
T_LINE7/A60 = IF (T_LINE6 NE ADDR_LINE3 AND ADDR_LINE3 NE ' ') THEN ADDR_LINE3
ELSE IF (T_LINE6 NE ADDR_LINE4 AND ADDR_LINE4 NE ' ') THEN ADDR_LINE4
ELSE IF (T_LINE4 NE CITY AND T_LINE5 NE CITY AND T_LINE6 NE CITY) AND CITY NE ' ' THEN CITY ELSE ' ';
T_LINE8/A60 = IF (T_LINE7 NE ADDR_LINE4 AND ADDR_LINE4 NE ' ') THEN ADDR_LINE4
ELSE IF (T_LINE4 NE CITY AND T_LINE5 NE CITY AND T_LINE6 NE CITY AND T_LINE7 NE CITY) AND CITY NE ' '
THEN CITY ELSE ' ';
T_LINE9/A60 = IF (T_LINE4 NE CITY AND T_LINE5 NE CITY AND T_LINE6 NE CITY AND T_LINE7 NE CITY AND T_LINE8 NE CITY)
AND CITY NE ' ' THEN CITY ELSE ' ';


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
I decided to try it even though the field size was larger and it worked. Much cleaner solution. Thanks.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
That depends on what version of focus you are using. We have an older version of focus running on VMS that still only allows for alpha fields up to 256 characters. Our newer version of WebFocus(5.something) allows for alpha fields that are much larger.


WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Platinum Member
posted Hide Post
One more issue. We have 2 fields that the business wants right justified. I tried right justifying in the stylesheet and it only did column1 of that field (the labels are 2 x 5). So, the right hand column of the labels the justifying did not have any impact Has this occurred to anyone else?

I ended up trying to rjust in the define but it's not working as expected. It's right justifying but all the fields are not lining up in the same position. I think the problem is because we use an arial font ... is there away around this problem and still be able to use the arial font?

-* File labels1.fex
-*DEFAULTS &OUT_STYLE = 3
FILEDEF OUTFILE DISK /app01/u02/logs/ibuilders/ibidir/rpt_KDQUHKo_h.rpt
-SET &OUT_STYLE = 3;
SET ALL=ON
SET EMPTYREPORT=ON
SET NODATA = ' '
SET PAGE-NUM=NOPAGE


-* Decide whether to output HTML or alternate format:
-IF &OUT_STYLE EQ 0 GOTO STEP_HTML;
-IF &OUT_STYLE EQ 1 GOTO EXCEL;
-IF &OUT_STYLE EQ 2 GOTO TAB_CSV;
-IF &OUT_STYLE EQ 3 GOTO PDF;
-* Else prepare HTML output:


-PDF
TABLE FILE MAILING_LABELS_VIEW
PRINT MAILING_TYPE_DESCR
RECIP_INTRO
RECIP_FIRST_NM
RECIP_LAST_NM
RECIP_MIDDLE_NM
RECIP_SUFFIX_NM
RECIP_TITLE
RECIP_OTHER_NM
ADDR_LINE1
ADDR_LINE2
ADDR_LINE3
ADDR_LINE4
ADDR_CITY
ADDR_STATE_PROV_SHORT_DESCR
ADDR_POSTAL_CD
EMPL_COST_CENTER
BY REL_SEI_CD
WHERE REL_SEI_CD IN ('ALPER')
-*BY ADDR_LINE1
ON TABLE NOTOTAL
ON TABLE HOLD AS HLD_LBLS
END

DEFINE FILE HLD_LBLS
NAME1/A200=IF RECIP_INTRO EQ ' ' THEN
RECIP_FIRST_NM || (' ' | RECIP_MIDDLE_NM) || (' ' | RECIP_LAST_NM) || (' ' | RECIP_SUFFIX_NM)
ELSE
RECIP_INTRO || (' ' | RECIP_FIRST_NM) || (' ' | RECIP_MIDDLE_NM) || (' ' | RECIP_LAST_NM) || (' ' | RECIP_SUFFIX_NM);
CITY/A60= IF ADDR_CITY EQ ' ' THEN
ADDR_STATE_PROV_SHORT_DESCR || (' ' | ADDR_POSTAL_CD)
ELSE
ADDR_CITY || (', ' | ' ' |ADDR_STATE_PROV_SHORT_DESCR) || (' ' | ADDR_POSTAL_CD);
CNTR/I6 = CNTR + 1;
COU_CNTR/I6 = IF REL_SEI_CD EQ LAST REL_SEI_CD THEN COU_CNTR + 1 ELSE 1;
T_LINE1/A50 = ' ';
RMAILING/A30 = RJUST(30,MAILING_TYPE_DESCR,RMAILING);
SPACE1/A30=' ';
T_LINE2/A60 = SPACE1 | RMAILING;
XNAME1/A40 =SUBSTR(40,NAME1,1,40,40,XNAME1);
REMPL/A10=RJUST(10,EMPL_COST_CENTER,REMPL);
T_LINE3/A50 = XNAME1 | REMPL;
T_LINE4/A50 = RECIP_TITLE;
T_LINE5/A50 = RECIP_OTHER_NM;
T_LINE6/A50 = ADDR_LINE1;
T_LINE7/A50 = ADDR_LINE2;
T_LINE8/A50 = ADDR_LINE3;
T_LINE9/A50 = ADDR_LINE4;
T_LINE10/A50 = SUBSTR(50,CITY,1,50,50,T_LINE10);
T_XL4/A51 = IF T_LINE4 EQ ' ' THEN ' ' ELSE T_LINE4 | 'X';
T_XL5/A51 = IF T_LINE5 EQ ' ' THEN ' ' ELSE T_LINE5 | 'X';
T_XL6/A51 = IF T_LINE6 EQ ' ' THEN ' ' ELSE T_LINE6 | 'X';
T_XL7/A51 = IF T_LINE7 EQ ' ' THEN ' ' ELSE T_LINE7 | 'X';
T_XL8/A51 = IF T_LINE8 EQ ' ' THEN ' ' ELSE T_LINE8 | 'X';
T_XL9/A51 = IF T_LINE9 EQ ' ' THEN ' ' ELSE T_LINE9 | 'X';
T_XL10/A51 = IF T_LINE10 EQ ' ' THEN ' ' ELSE T_LINE10 | 'X';
T_ONELINE/A357 = T_XL4 || T_XL5 || T_XL6 || T_XL7 || T_XL8 || T_XL9 || T_XL10;
T_NL4/A50 = SUBSTR(357,T_ONELINE,1,51,50,T_NL4);
T_NL5/A50 = SUBSTR(357,T_ONELINE,52,102,50,T_NL5);
T_NL6/A50 = SUBSTR(357,T_ONELINE,103,153,50,T_NL6);
T_NL7/A50 = SUBSTR(357,T_ONELINE,154,204,50,T_NL7);
T_NL8/A50 = SUBSTR(357,T_ONELINE,205,255,50,T_NL8);
T_NL9/A50 = SUBSTR(357,T_ONELINE,256,306,50,T_NL9);
T_NL10/A50 = SUBSTR(357,T_ONELINE,307,357,50,T_NL10);

XCOU/I4 = IF REL_SEI_CD EQ LAST REL_SEI_CD THEN XCOU ELSE XCOU + 1;
XLBL/I4 = IF ( (XCOU NE LAST XCOU) OR (XLBL EQ 10) ) THEN 1 ELSE XLBL + 1;
XPAG/I4 = IF XCOU NE LAST XCOU THEN 1 ELSE (IF XLBL EQ 1 THEN XPAG + 1 ELSE XPAG);
XCOL/I4 = IF ( (XLBL EQ 1) OR (XCOL EQ 2) ) THEN 1 ELSE XCOL + 1;
XROW/I4 = IF XLBL EQ 1 THEN 1 ELSE (IF XCOL EQ 1 THEN XROW + 1 ELSE XROW);
END

TABLE FILE HLD_LBLS
HEADING
"Mailing Labels For: SUM MAX.XPAG NOPRINT
BY XCOU NOPRINT
BY REL_SEI_CD NOPRINT REPAGE


SUM T_LINE1 AS ''
OVER T_LINE2 AS ''
OVER T_LINE3 AS ''
OVER T_NL4 AS ''
OVER T_NL5 AS ''
OVER T_NL6 AS ''
OVER T_NL7 AS ''
OVER T_NL8 AS ''
OVER T_NL9 AS ''
OVER T_NL10 AS ''
-NOMORE
BY XCOU NOPRINT
BY REL_SEI_CD NOPRINT
BY XPAG NOPRINT
BY XROW NOPRINT

ACROSS XCOL NOPRINT
ON XPAG PAGE-BREAK
ON XROW SUBHEAD
" "
ON XROW SUBFOOT
" "
ON TABLE SET ONLINE-FMT PDF
-*ON TABLE HOLD AS OUTFILE FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.152778,
RIGHTMARGIN=0.000000,
-* TOPMARGIN=0.010000,
-* BOTTOMMARGIN=0.200000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
LABELNAME=AVERY 5163 ADDRESS,
LABELPROMPT=OFF,
$
TYPE=REPORT, FONT='ARIAL', SIZE=12, STYLE=NORMAL, $
TYPE=HEADING, FONT='ARIAL', SIZE=8, STYLE=NORMAL, $
TYPE=SUBHEAD, SIZE=5, TOPGAP=0.13000, $
TYPE=SUBFOOT, SIZE=5, TOPGAP=0.05000, $

ENDSTYLE
END


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Member
posted Hide Post
I used this coding and it worked great, however, it printed a line across the top of each page and when my page break field of 'process level' went to more than 1 page, it printed a blank page in between with the annoying line. I also had to play with the settings to get Avery 5160/8160 to work. I'm putting my code here to help others. I ended up changing the pagesize in order to get the last labels to print at the bottom without forcing a premature page break or another blank page when there was more than 1 page for a process level.

SET PAGE-NUM=NOPAGE
SET PAGESIZE=GERMAN-STANDARD-FANFOLD
SET NODATA=''
-* get rid of annoying line across top of page
SET ACROSSLINE=OFF

-HOLDFILE
TABLE FILE EMPLOYEE
PRINT EMPLOYEE
MIDDLE_INIT
EMP_STATUS
PROCESS_LEVEL
JOB_CODE
BY COMPANY
BY PROCESS_LEVEL
BY LAST_NAME
BY FIRST_NAME
WHERE (COMPANY EQ 7 );
WHERE (EMP_STATUS EQ '1F' OR '2B' OR '1C' OR '1B');
WHERE PROCESS_LEVEL IN ('9702','9708','9724','9726','9745','9750','9751','9771','9773');
ON TABLE HOLD AS HOLDLAB
END

-DEF
DEFINE FILE HOLDLAB
EmployeeName/A50= LAST_NAME || ( ', ' | FIRST_NAME) || (' ' | MIDDLE_INIT);
CR_DATE/YYMD = '&DATEYYMD';
XDATEI8/I8YYMD = CR_DATE;
DAY_OF_WEEK/A4 = DOWK(XDATEI8,DAY_OF_WEEK);
DAYNBR/I1= DECODE DAY_OF_WEEK('SUN' 1 'MON' 2 'TUE' 3 'WED' 4 'THU' 5 'FRI' 6 'SAT' 7);

WEEK_END_DATE/YYMD = IF DAYNBR EQ 1 THEN DATEADD(CR_DATE,'D',13) ELSE
IF DAYNBR EQ 2 THEN DATEADD(CR_DATE,'D',12) ELSE
IF DAYNBR EQ 3 THEN DATEADD(CR_DATE,'D',11) ELSE
IF DAYNBR EQ 4 THEN DATEADD(CR_DATE,'D',10) ELSE
IF DAYNBR EQ 5 THEN DATEADD(CR_DATE,'D',9) ELSE
IF DAYNBR EQ 6 THEN DATEADD(CR_DATE,'D',8) ELSE
IF DAYNBR EQ 7 THEN DATEADD(CR_DATE,'D',7);
CNTR/I6 = CNTR + 1;
PL_CNTR/I6 = IF PROCESS_LEVEL EQ LAST PROCESS_LEVEL THEN PL_CNTR + 1 ELSE 1;
L2_EMP/A11 = EDIT(EMPLOYEE);
TRIM_L2_EMP/A6 = TRIM('L',L2_EMP,11,'0',1,'A6');
P_WK/MDYY = WEEK_END_DATE;
ALPHA_P_WK/A8MDYY = P_WK;

EMPNAME/A36 = EDIT(EmployeeName,'999999999999999999999999999999999999$$$$$$$$$$$$$$');
T_LINE1/A36 = LCWORD(36,EMPNAME,T_LINE1);
T_LINE2/A36 = 'Emp #: ' || TRIM_L2_EMP || ' W/E: ' || EDIT(ALPHA_P_WK,'99/99/9999');
T_LINE3/A36 = 'PL: ' || PROCESS_LEVEL || ' JC: ' || JOB_CODE;
T_LINE4/A36 = ' ';
T_LINE5/A36 = ' ';

XPL/I4 = IF PROCESS_LEVEL EQ LAST PROCESS_LEVEL THEN XPL ELSE XPL + 1;
XLBL/I4 = IF ( (XPL NE LAST XPL) OR (XLBL EQ 30) ) THEN 1 ELSE XLBL + 1;
XPAG/I4 = IF XPL NE LAST XPL THEN 1 ELSE (IF XLBL EQ 1 THEN XPAG + 1 ELSE XPAG);
XCOL/I4 = IF ( (XLBL EQ 1) OR (XCOL EQ 3) ) THEN 1 ELSE XCOL + 1;
XROW/I4 = IF XLBL EQ 1 THEN 1 ELSE (IF XCOL EQ 1 THEN XROW + 1 ELSE XROW);
END

-LABELS
TABLE FILE HOLDLAB
SUM T_LINE1 AS ''
OVER T_LINE2 AS ''
OVER T_LINE3 AS ''
OVER T_LINE4 AS ''
OVER T_LINE5 AS ''
BY XPL NOPRINT
BY PROCESS_LEVEL NOPRINT
BY XPAG NOPRINT
BY XROW NOPRINT
ACROSS XCOL NOPRINT
ON XPAG PAGE-BREAK
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
UNITS=IN,
-* PAGESIZE='Letter',
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
LEFTMARGIN=0.15,
RIGHTMARGIN=0.188,
TOPMARGIN=0.09000,
BOTTOMMARGIN=0.000000,$
RIGHTGAP=0.55000,$
LEFTGAP=0.20000,$
TOPGAP=0.083,$
FONT=ARIAL,$
SIZE=11,$
ENDSTYLE
END
 
Posts: 20 | Location: Syracuse NY | Registered: August 26, 2005Report 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     mailing labels - page break

Copyright © 1996-2020 Information Builders