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] Letters in PDF
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Letters in PDF
 Login/Join
 
Platinum Member
posted
I have generated a letter by typing the body of the letter in the HEADER and using the fields for the information of the letter. I want to put this same letter 2 more times on the same page generating 3 letters that are all the same. It will print out on the preforated paper and serve as copies for our gift receipts.

I have done this before by typing the letter 3 times in the header and inserting the fields, but that becomes a problem when some of the fields have to be totaled, and when there is more than one transaction per letter.

Is there a way to just print the letter 3 times without doing anything complicated?

Thank you.

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


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
My quick answer would be to either:

Create a compound PDF report reading the data three times in three individual report requests

or:

Use the MORE FILE syntax to to read the data three times withing the same report request (if the totals are not affected by this).


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I don't understand the first solution.


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Virtuoso
posted Hide Post
Tracie,

I hate to be vague but it sounds like you want to create a CO-ORDINATED PDF document, not a COMPOUND PDF document. This would require designing the report in DevStudio.

Without knowing how you data is stored it is hard to answer your question with a better technique. I can think of some possibilities but it would require lengthy explanations with knowing how your data is stored. It sounds like from what you are saying is that all the necessary fields for all three letters are stored in one record but there are times when there is more than one record which would need to show in one of the three letters.

I think using one of the McGyver techniques might help you in this as well. The technique I am thinking of is the one where you JOIN your database to a dummy database containing a counter field. This technique is used to force database records to be duplicated. I have not used this technique in a very long time but it sounds like it will help you. Does anyone have a link to info about this technique?

I hope this gives you some ideas.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
This example creates a compound report with each report on a separate page. If the three reports need to be on the same page, this can be controlled with the NOBREAK option in the SET COMPOUND command and the ON TABLE PCHOLD FORMAT PDF command.

-SET &ECHO=ALL;

SET PAGE-NUM=OFF
-RUN

-* Report 1 --------------------------------------

SET COMPOUND = OPEN
-RUN

TABLE FILE CENTORD
HEADING
"Sales Report "
"Page<TABPAGENO"
" "
SUM LINEPRICE
BY PRODCAT
ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN

-* Report 2 --------------------------------------

TABLE FILE CENTORD
HEADING
"Sales Report "
"Page<TABPAGENO"
" "
SUM LINEPRICE
BY PRODCAT
ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN

-* Report 3 --------------------------------------

SET COMPOUND = CLOSE
-RUN

TABLE FILE CENTORD
HEADING
"Sales Report "
"Page<TABPAGENO"
" "
SUM LINEPRICE
BY PRODCAT
ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN


If you need each copy of the letter to start at page 1, you can add this to just before each TABLE FILE:

SET FOCFIRSTPAGE = 1


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
quote:
I have generated a letter by typing the body of the letter in the HEADER and using the fields for the information of the letter. I want to put this same letter 2 more times on the same page generating 3 letters that are all the same. It will print out on the preforated paper and serve as copies for our gift receipts.

Am I interpretting this as correct that you want three copies of the same letter on one page so you can print out on letter paper that has been perferated so you'll have three copies of the same letter. If so the McGyver technique may be what you need as mgrackin indicated.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
A PDF COmpound report should be able to take care of this.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Yes Leah, that is correct....each letter is the same.....the bottom 2 letters will have the word 'COPY' on them.....

Thanks for all of your help, I am about to try the technique.....

Stay tuned...


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Platinum Member
posted Hide Post
Hi Tracie,

Here's an idea using the CAR file as an example. It uses a multi-pane pdf report to print three logical pages(1 original and 2 copies) on one physical page.

-*************************************************
-* CREATE A HOLD FILE OF YOUR REPORT DATA
-*************************************************
DEFINE FILE CAR
RPT_KEY/A6 = 'REPORT';
END
TABLE FILE CAR
PRINT
RPT_KEY
COMPUTE RPT_CNTR/I5 = RPT_CNTR + 1;
BY COUNTRY
BY CAR
ON TABLE HOLD AS HLD_RPT
END
-*************************************************
-* CREATE A DUMMY FILE OF THREE RECORDS
-* (ONE ORIGINAL AND TWO COPIES)
-*************************************************
DEFINE FILE CAR
CPY_CNTR/I5 WITH CAR = CPY_CNTR + 1;
CPY_TYPE/A4 WITH CAR = DECODE CPY_CNTR (
1 'ORIG'
2 'COPY'
3 'COPY'
);
CPY_KEY/A6 WITH CAR = 'REPORT';
END
-*
TABLE FILE CAR
SUM CPY_TYPE
BY CPY_KEY
BY CPY_CNTR
WHERE RECORDLIMIT EQ 3
ON TABLE HOLD AS HLD_CPY FORMAT FOCUS INDEX CPY_KEY
END
-*************************************************
-* JOIN REPORT DATA TO ALL DUMMY RECORDS
-* THIS CREATES 3 RECORDS FOR EACH REPORT RECORD
-*************************************************
JOIN RPT_KEY IN HLD_RPT TO ALL CPY_KEY IN HLD_CPY AS J1
TABLE FILE HLD_RPT
PRINT
COUNTRY
CAR
BY RPT_CNTR
BY CPY_CNTR
BY CPY_TYPE
ON TABLE HOLD
END
-*************************************************
-* THIS CREATES A MULTI-PANE PDF REPORT
-* EACH PHYSICAL PAGE WILL CONTAIN AN ORIGINAL
-* AND TWO COPIES OF YOUR REPORT INFO
-*************************************************
SET PAGE-NUM=NOPAGE
-*
TABLE FILE HOLD
HEADING
"**********************************"
"REPORT CNTR: <12 "COPY CNTR: <12 "COPY TYPE: <12 " "
"COUNTRY: <12 "CAR: <12 " "
"THIS IS A TEST"
"ONE...TWO...THREE"
"**********************************"
PRINT CPY_TYPE NOPRINT
BY RPT_CNTR NOPRINT
BY CPY_CNTR NOPRINT
ON CPY_CNTR PAGE-BREAK
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=REPORT,UNITS=IN,PAGESIZE='Letter',
SIZE=8,SQUEEZE=ON,STYLE=NORMAL,
PAGEMATRIX=(1 3),ELEMENT=(3.000000 4.000000),
MATRIXORDER=HORIZONTAL,
$
ENDSTYLE
END

I don't know if this will help, but if so, let me know.
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
Expert
posted Hide Post
Too much coding for what you require. As Leah pointed out, this is a prime candidate for the McGyver technique. This example combines the McGyver table with the data that you want to show in your report and eliminates a certain amount of effort. -

SQL
  SELECT DISTINCT 1 AS PAGENO, REGION, SUM(DOLLARS) AS DOLLARS FROM GGSALES GROUP BY REGION
UNION ALL
  SELECT DISTINCT 2 AS PAGENO, REGION, SUM(DOLLARS) AS DOLLARS FROM GGSALES GROUP BY REGION
UNION ALL
  SELECT DISTINCT 3 AS PAGENO, REGION, SUM(DOLLARS) AS DOLLARS FROM GGSALES GROUP BY REGION
;
TABLE
ON TABLE HOLD AS GGTEMP
END
-RUN

TABLE FILE GGTEMP
BY REGION NOPRINT
BY PAGENO NOPRINT PAGE-BREAK
HEADING
"WebFOCUS Forum"
"https://forums.informationbuilders.com"
"T'internet (it's a north Brit thing)"
"</3"
"Dear Sir/Madam </1"
"The Forum members would like to take this opportunity to thank"
"all contributing members from the <REGION region for their infinite"
"wisdom and insight. Also for raising $<DOLLARS</3"
"Best regards </1"
"Forum Members"
ON REGION REPAGE
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  TYPE=HEADING, LINE=1, JUSTIFY=CENTER, $
  TYPE=HEADING, LINE=2, JUSTIFY=CENTER, $
  TYPE=HEADING, LINE=3, JUSTIFY=CENTER, $
  TYPE=HEADING, LINE=18, JUSTIFY=CENTER, $
ENDSTYLE
END

Good luck

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
BELOW IS MY REPORT CODE......I AM CONFUSED WITH THE FIRST SQL STATEMENT FROM THE MCGUVER TECHNIQUE....SORRY I AM SLOW!! PLEASE HELP WITH GETTING ME STARTED ON THAT SQL STATEMENT BASED ON MY CODE BELOW FOR THE MAIN REPORT.
THANKS!

JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_ENTRY_USER IN AA_GIFT_DETAIL TO MULTIPLE
V_NCAT_AG_CASHIER.V_NCAT_AG_CASHIER.AGBCSHR_USER IN V_NCAT_AG_CASHIER AS J0
END
JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.ID IN AA_GIFT_DETAIL TO UNIQUE
AA_CONSTITUENT_IDENTIFICATION.ID IN AA_CONSTITUENT_IDENTIFICATION AS J1
END
JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.ID IN AA_GIFT_DETAIL TO UNIQUE
V_NCAT_AA_CONSTORG_IDENT.V_NCAT_AA_CONSTORG_IDENT.SPRIDEN_ID
IN V_NCAT_AA_CONSTORG_IDENT AS J2
END
JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.DESIGNATION_KEY IN AA_GIFT_DETAIL TO UNIQUE
ADBDESG.ADBDESG.ADBDESG_DESG IN ADBDESG AS J3
END
DEFINE FILE AA_GIFT_DETAIL
GIFTAMT/D8.2=GIFT_AMT;
SORTFIELD/A1='';
EDATE/YYMD=HDATE(GIFT_ENTRY_DATE,'YYMD');
SUFF/A65=IF NAME_SUFFIX NE MISSING THEN NAME_SUFFIX||'.' ELSE ' ';
NAME1/A240=
IF SPRIDEN_FIRST_NAME NE ' ' THEN
(NAME_PREFIX) ||
('. ' |FIRST_NAME) ||
(' ' |MIDDLE_NAME) ||
(' ' |LAST_NAME)||
(' ' |SUFF)
ELSE SPRIDEN_LAST_NAME;
DESG/A2=EDIT(DESIGNATION_KEY, '$9$$$$');
GDATE/YYMD=HDATE(GIFT_DATE, 'YYMD');
GDATE2/MDYY=HDATE(GIFT_DATE, 'MDYY');
USER_START_DATE/MDYY=HDATE(AGBCSHR_START_DATE, 'MDYY');
USER_END_DATE/MDYY=HDATE(AGBCSHR_END_DATE, 'MDYY');
ADDRESS/A100=IF SPRIDEN_FIRST_NAME NE ' ' THEN PREF_STREET_LINE1 ELSE SPRADDR_STREET_LINE1;
ADDRESS1/A100= IF SPRIDEN_FIRST_NAME NE ' ' THEN PREF_STREET_LINE2||(' '| PREF_STREET_LINE3)
ELSE SPRADDR_STREET_LINE2||(' '|SPRADDR_STREET_LINE3);
ADDRESS2/A190=
IF SPRIDEN_FIRST_NAME NE ' ' THEN PREF_CITY||(' '|PREF_STAT_CODE)||(' '|PREF_ZIP)
ELSE SPRADDR_CITY||(', '|SPRADDR_STAT_CODE)||(' '|SPRADDR_ZIP);
TOTALADDRESS2/A190=IF ADDRESS1 EQ ' ' THEN ADDRESS2 ELSE ADDRESS1;
TOTALADDRESS3/A190=IF TOTALADDRESS2 EQ ADDRESS2 THEN ' ' ELSE ADDRESS2;
SESS_NUM/A7=EDIT(AGBCSHR_SESSION_NUMBER, '$$$9999');
ID_NUM/A30=DESG||SPRIDEN_ID||('-'|SESS_NUM);
AMPER/A16='&'||' Technical';
AMPER2/A2='&'||'T';
VEHICLE/A90=IF PGVE_CODE EQ 'UNIV' THEN 'NORTH CAROLINA A'||AMPER2|| ' STATE UNIVERSITY'
ELSE IF PGVE_CODE EQ 'ALUM' THEN 'NORTH CAROLINA A'||AMPER2|| ' ALUMNI ASSOCIATION'
ELSE IF PGVE_CODE IS MISSING AND ADBDESG_DGRP_CODE NE 'VICT' THEN 'NORTH CAROLINA A'||AMPER2|| ' UNIVERSITY FOUNDATION'
ELSE IF ADBDESG_DGRP_CODE EQ 'VICT' THEN 'VICTORY CLUB';
SORTFIELD/A1='';
SIGNATURE/A80=IF PGVE_CODE EQ 'UNIV' THEN 'Mark Kiel, Interim Vice Chancellor of Development'
ELSE IF PGVE_CODE EQ MISSING AND ADBDESG_DGRP_CODE NE 'VICT' THEN 'Mark Kiel, Interim Executive Director'
ELSE IF ADBDESG_DGRP_CODE EQ 'VICT' THEN 'Mark Kiel, Interim Vice Chancellor of Development';
END
TABLE FILE AA_GIFT_DETAIL
SUM
'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_AMT' AS 'Gift Amount'
BY 'V_NCAT_AA_CONSTORG_IDENT.V_NCAT_AA_CONSTORG_IDENT.SPRIDEN_ID' NOPRINT
BY SORTFIELD NOPRINT
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_NO_KEY' AS 'Gift #'
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GDATE2' AS 'Gift Date'
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_DESC' AS 'Description'
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.DESIGNATION_NAME' AS 'Designation'
ON V_NCAT_AA_CONSTORG_IDENT.V_NCAT_AA_CONSTORG_IDENT.SPRIDEN_ID PAGE-BREAK
ON AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_NO_KEY RECOMPUTE AS 'Grand Total for Gift #'
HEADING
" "
"&DATEtrMDYY <+0> "
" "
"Thank you for your contribution in support of North Carolina Agricultural "In accordance with IRS requirements, no goods or services were provided in return for this contribution. "
" "
" " "
" " "
" "
FOOTING
" "
WHERE ( GIFT_ENTRY_USER EQ '&GIFT_ENTRY_USER.ENTER USERNAME (ALL CAPS).' );
WHERE ( AGBCSHR_SESSION_NUMBER EQ &AGBCSHR_SESSION_NUMBER.ENTER SESSION NUMBER.);
WHERE ( GIFT_AMT GT 0 );
WHERE FISC_CODE EQ 2007;
WHERE GIFT_CODE EQ 'CK' OR 'CS' OR 'MG' OR 'MO' OR 'WT' OR 'CC' OR 'SE';
WHERE DESIGNATION_KEY NE 'TFPREMIUM' OR 'TUPREMIUM';
WHERE ( GIFT_ENTRY_DATE GE AGBCSHR_START_DATE ) AND ( GIFT_ENTRY_DATE LE AGBCSHR_END_DATE );
WHERE TOTAL (GIFT_AMT LT 250 );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD AS PDF
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=1.000000,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.388889,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
FONT='TIMES NEW ROMAN',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLUMN=N1,
SIZE=10,
$
TYPE=DATA,
COLUMN=N10,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N11,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N12,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N13,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N14,
FONT='TIMES NEW ROMAN',
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N1,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N10,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N11,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N12,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N13,
SIZE=12,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=10,
STYLE=-UNDERLINE,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=3,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=2,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=3,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=3,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=3,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=4,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=4,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=4,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=5,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=5,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=5,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=6,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=6,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=6,
OBJECT=TEXT,
ITEM=4,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=6,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=6,
OBJECT=FIELD,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=7,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=7,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=7,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=7,
OBJECT=FIELD,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=8,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=8,
OBJECT=TEXT,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=8,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=8,
OBJECT=FIELD,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=9,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=9,
OBJECT=TEXT,
ITEM=2,
STYLE=-UNDERLINE,
POSITION=2.180556,
$
TYPE=HEADING,
LINE=9,
OBJECT=TEXT,
ITEM=3,
SIZE=10,
$
TYPE=HEADING,
LINE=9,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=9,
OBJECT=FIELD,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=TEXT,
ITEM=3,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=TEXT,
ITEM=4,
SIZE=10,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=TEXT,
ITEM=5,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=TEXT,
ITEM=6,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=10,
OBJECT=FIELD,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
POSITION=4.000000,
$
TYPE=HEADING,
LINE=11,
OBJECT=TEXT,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=11,
OBJECT=TEXT,
ITEM=2,
SIZE=10,
$
TYPE=HEADING,
LINE=11,
OBJECT=TEXT,
ITEM=3,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=11,
OBJECT=TEXT,
ITEM=5,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=11,
OBJECT=TEXT,
ITEM=6,
STYLE=NORMAL,
JUSTIFY=RIGHT,
$
TYPE=HEADING,
LINE=11,
OBJECT=FIELD,
ITEM=1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=11,
OBJECT=FIELD,
ITEM=2,
SIZE=11,
STYLE=NORMAL,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
LINE=1,
OBJECT=TEXT,
ITEM=2,
STYLE=NORMAL,
$
TYPE=FOOTING,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=10,
STYLE=BOLD+ITALIC,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BY=1,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N12,
WRAP=1.555556,
$
TYPE=REPORT,
COLUMN=N13,
WRAP=6.000000,
$
TYPE=REPORT,
COLUMN=N5,
WRAP=1.180556,
$
TYPE=REPORT,
COLUMN=N6,
WRAP=2.000000,
$
TYPE=REPORT,
COLUMN=N9,
WRAP=6.000000,
$
ENDSTYLE
END


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
Tracie,

Ok, an explanation of sorts.

The SQL bit is basically taking the contents of the file GGSALES and making three rows out of 1 so that when I sort BY PAGENO it will prodcue three pages instead of one if I just used the base GGSALES file.

I can simulate your process by HOLDing the data that I want in my report in a temporary file. If you insert this code at the top of my example code you will see what I mean.

TABLE FILE GGSALES
SUM DOLLARS
BY REGION
ON TABLE HOLD AS TEMPFILE
END
-RUN

SQL
  SELECT DISTINCT 1 AS PAGENO, REGION, SUM(DOLLARS) AS DOLLARS FROM TEMPFILE GROUP BY REGION
UNION ALL
  SELECT DISTINCT 2 AS PAGENO, REGION, SUM(DOLLARS) AS DOLLARS FROM TEMPFILE GROUP BY REGION
UNION ALL
  SELECT DISTINCT 3 AS PAGENO, REGION, SUM(DOLLARS) AS DOLLARS FROM TEMPFILE GROUP BY REGION
;
TABLE
ON TABLE HOLD AS GGTEMP
END
-RUN


To achieve a similar function on your code I would insert two new pieces after the define -

TABLE FILE AA_GIFT_DETAIL
SUM 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_AMT'
BY 'V_NCAT_AA_CONSTORG_IDENT.V_NCAT_AA_CONSTORG_IDENT.SPRIDEN_ID'
BY SORTFIELD
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_NO_KEY'
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GDATE2'
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_DESC'
BY 'AA_GIFT_DETAIL.AA_GIFT_DETAIL.DESIGNATION_NAME'
ON TABLE HOLD AS TEMPFILE
END
-RUN

SQL
  SELECT SPRIDEN_ID
       , SORTFIELD
       , GIFT_NO_KEY
       , GDATE2
       , GIFT_DESC
       , DESIGNATION_NAME
       , SUM(GIFT_AMT) AS GIFT_AMT
       , 1 AS PAGENO
    FROM TEMPFILE
UNION ALL
  SELECT SPRIDEN_ID
       , SORTFIELD
       , GIFT_NO_KEY
       , GDATE2
       , GIFT_DESC
       , DESIGNATION_NAME
       , SUM(GIFT_AMT) AS GIFT_AMT
       , 2 AS PAGENO
    FROM TEMPFILE
UNION ALL
  SELECT SPRIDEN_ID
       , SORTFIELD
       , GIFT_NO_KEY
       , GDATE2
       , GIFT_DESC
       , DESIGNATION_NAME
       , SUM(GIFT_AMT) AS GIFT_AMT
       , 3 AS PAGENO
    FROM TEMPFILE
;
TABLE
ON TABLE HOLD AS REPTEMP
END
-RUN

and then run the report against the temporary REPTEMP file page breaking on PAGENO, which you would add as an additional sort (with NOPRINT) after SPRIDEN_ID. The rest of your table request would remain unchanged.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
The trick in this request is to get each letter to duplicate three times while maintaining EVEN SPACING on the page. CO-ORDINATED PDF documents provide an easy way to do this.

The following is another approach which uses the McGyver technique while attempting to maintain even spacing for each letter on the page.

Create a Master File Description called 'MCGYVER.MAS' with the following contents and put it in a directory in the APP PATH:

FILE=MCGYVER, SUFFIX=FIX,$
SEGNAME=ONE,$
FIELD=BLANKKEY, BLANKKEY, A1, A1,$
SEGNAME=TWO, OCCURS=3, PARENT=ONE,$
FIELD=ALPHAKEY, ALPHAKEY, A1, A1,$
FIELD=MCGYVER , ORDER , I4, I4,$

Create a text file called 'MCGYVER.DAT' with the following contents and put it in the same directory as the MCGYVER.MAS file:

ABC

Notice there is one space before the 'ABC'

Next, run the following report. Change the 'TSTSTUFF' directory in the APP FI command to the name of the APP PATH directory which contains the MCGYVER.MAS and .DAT files. I use the SUBFOOT and WHEN to add the proper amount of SUBFOOT lines to even space the letters:

APP FI MCGYVER DISK TSTSTUFF/MCGYVER.DAT
-RUN
JOIN BLANKKEY WITH BODYTYPE IN CAR TO BLANKKEY IN MCGYVER AS M1
-RUN
DEFINE FILE CAR
BLANKKEY/A1='';
END
-RUN
TABLE FILE CAR
SUM CNT.BODYTYPE WITHIN MCGYVER NOPRINT
COMPUTE CNTBODY/I5=CNT.BODYTYPE; NOPRINT
BY COUNTRY AS ''
BY MCGYVER AS ''
SUM SALES AS ''
BY COUNTRY NOPRINT PAGE-BREAK
BY MCGYVER NOPRINT
BY COUNTRY AS ''
BY CAR AS ''
BY MODEL AS ''
BY BODYTYPE AS ''
ON MCGYVER SUBHEAD
"This is the HEADING for ORIG</2"
WHEN MCGYVER EQ 1;
ON MCGYVER SUBHEAD
"This is the HEADING for COPY 1</2"
WHEN MCGYVER EQ 2;
ON MCGYVER SUBHEAD
"This is the HEADING for COPY 2</2"
WHEN MCGYVER EQ 3;
ON MCGYVER SUBFOOT
"</24"
WHEN CNTBODY EQ 1;
ON MCGYVER SUBFOOT
"</23"
WHEN CNTBODY EQ 2;
ON MCGYVER SUBFOOT
"</22"
WHEN CNTBODY EQ 3;
ON MCGYVER SUBFOOT
"</21"
WHEN CNTBODY EQ 4;
ON MCGYVER SUBFOOT
"</20"
WHEN CNTBODY EQ 5;
ON MCGYVER SUBFOOT
"</19"
WHEN CNTBODY EQ 6;
ON MCGYVER SUBFOOT
"</18"
WHEN CNTBODY EQ 7;
ON MCGYVER SUBFOOT
"This is the end of the letter."
"--------------------------------------------------"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, FONT='ARIAL', SIZE=8, $
ENDSTYLE
END

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


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Platinum Member
posted Hide Post
Tony A,

I finally got your solution to work but the heading is the only thing that is not printing 3 times....the other data is....its below...

NORTH CAROLINA A&T UNIVERSITY FOUNDATION January 31, 2007
Thank you for your contribution in support of North Carolina Agricultural & Technical State University.
In accordance with IRS requirements, no goods or services were provided in return for this contribution.

950039959 - 0513
Mrs. Don S Simpson
4XXX Wake Drive
_______________________________
Greensboro NC 27407-4079 Mark Kiel, Interim Executive Director
Gift # Gift Date Description Designation Gift Amount

0009387 2006/07/11 Check 1269 Annual Fund 50.00
Grand Total for Gift # 0009387 50.00


0009387 2006/07/11 Check 1269 Annual Fund 50.00
Grand Total for Gift # 0009387 50.00

0009387 2006/07/11 Check 1269 Annual Fund 50.00
Grand Total for Gift # 0009387 50.00

This message has been edited. Last edited by: Tracie Jones,


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Platinum Member
posted Hide Post
Francis,

I got your solution to work (PDF Compound), but its putting the letter on 3 different pages.....

This is so fun.... Smiler

This message has been edited. Last edited by: Tracie Jones,


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Member
posted Hide Post
Try moving the heading and footing to a subhead and subfoot. Also make sure you page-break is before the by mcgyver sort.


WF 7.6.9 Windows
 
Posts: 10 | Registered: May 02, 2006Report This Post
Platinum Member
posted Hide Post
THAT WORKED! I just changed Heading to Subhead. I have no footer. However, I do need the headers (field names) to print 3 times...its only printing once....and its at the very top of the letter.....

Gift # Gift Date Description Designation Gift Amount

NORTH CAROLINA A&T UNIVERSITY FOUNDATION January 31, 2007
Thank you for your contribution in support of North Carolina Agricultural & Technical State University.
In accordance with IRS requirements, no goods or services were provided in return for this contribution.
950000326 - 0513
Mrs. EXXXX Wesley
3XX N 31st Street _______________________________
Harrisburg PA 17109 Mark Kiel, Interim Executive Director
0009437 2006/07/11 Check 1304 Annual Fund 25.00
Grand Total for Gift # 0009437 25.00


NORTH CAROLINA A&T UNIVERSITY FOUNDATION January 31, 2007
Thank you for your contribution in support of North Carolina Agricultural & Technical State University.
In accordance with IRS requirements, no goods or services were provided in return for this contribution.
950000326 - 0513
Mrs. Exxxx Wesley
3xx N 31st Street _______________________________
Harrisburg PA 17109 Mark Kiel, Interim Executive Director
0009437 2006/07/11 Check 1304 Annual Fund 25.00
Grand Total for Gift # 0009437 25.00


NORTH CAROLINA A&T UNIVERSITY FOUNDATION January 31, 2007
Thank you for your contribution in support of North Carolina Agricultural & Technical State University.
In accordance with IRS requirements, no goods or services were provided in return for this contribution.
950000326 - 0513
Mrs. Exxx Wesley
3xx N 31st Street _______________________________
Harrisburg PA 17109 Mark Kiel, Interim Executive Director
0009437 2006/07/11 Check 1304 Annual Fund 25.00
Grand Total for Gift # 0009437 25.00

THANKS SO MUCH.....I AM GETTING THERE!!!


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Member
posted Hide Post
You're going to have to place everything into subheads, instead of displaying the columns in the sum, you need to do noprint and then display the fields and column heading using the subhead


WF 7.6.9 Windows
 
Posts: 10 | Registered: May 02, 2006Report This Post
Platinum Member
posted Hide Post
gotcha!!

Thanks again!


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Virtuoso
posted Hide Post
Tracie,

I think what Adri meant to say was to use AS '' on the fields in your SUM statement and then code the Column Titles into the SUBHEAD.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Some may consider this not the most efficient method, but it avoids McGyvering:

TABLE FILE CAR
SUM
COMPUTE RUN/I1 = 1;
SALES
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS CAR1H FORMAT ALPHA
END

TABLE FILE CAR1H
SUM
COMPUTE RUN/I1 = 2;
SALES
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS CAR2H FORMAT ALPHA
END

TABLE FILE CAR1H
SUM
COMPUTE RUN/I1 = 3;
SALES
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS CAR3H FORMAT ALPHA
END

TABLE FILE CAR1H
PRINT
SALES AS ''
BY COUNTRY NOPRINT PAGE-BREAK
BY RUN NOPRINT SUBHEAD
" "
"CAR<+0>MODEL<+0>SALES"
" "
BY CAR AS ''
BY MODEL AS ''
HEADING
"WEBFOCUS REPORT FOR <COUNTRY"
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
TYPE=HEADING, STYLE=BOLD, $
TYPE=SUBHEAD, STYLE=BOLD, $
TYPE=SUBHEAD, ITEM=1, POSITION=P1, $
TYPE=SUBHEAD, ITEM=2, POSITION=P2, $
TYPE=SUBHEAD, ITEM=3, POSITION=P3, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
MORE
FILE CAR2H
MORE
FILE CAR3H
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Hey everybody! 2 and a half years later and we are now using BDMS (Xtender), thus no need for copies! Now I have to redo this receipt to print 3 different records on each page instead of 3 of the same records on one page. Please help me do this correctly!!!


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
Take a look at

Creating Reports With WebFOCUS Language > Laying Out the Report Page > Working With Mailing Labels and Multi-Pane Pages

A "multi-pane" page using PAGEMATRIX may work for this report.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Am I supposed to have this manual? Or is it online somewhere? I looked through my manuals and don't see this title...


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
You can download it from the IBI website. See the top link in the upper right corner of this page.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Tracie, "2 and a half years later" and you're not sure where the manuals are? I'm a little surprised.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Never used them! I use my on....


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Platinum Member
posted Hide Post
Thanks GinnyJakes!


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
You're welcome. I'd recommend that as you move up in releases, you download the current version of your manuals as behaviours and syntax change.

You can also order a release 7.6 version of the language manual referred to in this post if you prefer hardcopy.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Thank you so much. I will do that!


tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha
 
Posts: 132 | Location: Chapel Hill, NC | Registered: October 24, 2006Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Letters in PDF

Copyright © 1996-2020 Information Builders