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] Number of Copies

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Number of Copies
 Login/Join
 
Member
posted
I'm unable to get the search function for the forums to work, and need a little help. I am creating a report that when printed needs to print two copies per record.

1) where do I go to set up the job to print two copies without user intervention?
2) How can I print two copies of the same record before printing the next record?

Thank you so much

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


Web Focus Developer Studio Release 7.6.1 Output formats include Excel, PDF, HTML, XML.
 
Posts: 25 | Registered: September 05, 2008Report This Post
Expert
posted Hide Post
Please update your signature so we know what version and what platform you're on.

1) print 2 copies of a what? a report?, is it PDF or HTML?

2) 2 records for every 1 record in the database? or 2 copies of a report? same question, essentially.
You'll need to carefully state exactly what you need, before we can point you.
-s




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Wonder Why the Search Function Not Available?
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Search tab works fine for me. Try searching on "MacGuyver." This is a commonly used technique for multiplying rows of data. It could be used for making two rows out of one or two reports out of one, depending on where you create and break on sort values.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
Another way that noone uses too much anymore is to print the same data n times across a made-up counter, hold it, then use an alternate master with an occurs to do the report.


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
Member
posted Hide Post
quote:
Originally posted by susannah:
Please update your signature so we know what version and what platform you're on.

1) print 2 copies of a what? a report?, is it PDF or HTML? PDF

Example: I have a list of 10 serial numbers. I have one form. I want to print two copies of the form for each serial, but I don't want to set the # of copies needed from the printer screen each time. I want to put this to code in the job.

WebFocus Developer Studio 7.1.4

Thanks
-s


Web Focus Developer Studio Release 7.6.1 Output formats include Excel, PDF, HTML, XML.
 
Posts: 25 | Registered: September 05, 2008Report This Post
Expert
posted Hide Post
same question.....
is it html or pdf???




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Timpy,

You have been given 2 workable solutions. Please let us know which one you want to pursue and what kind of additional information you need.

You can search the Advanced link above for information on MacGuyver.


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
Member
posted Hide Post
Both of these workable solutions are beyond my capabilities as I am just learning. Can I get an example of a made-up counter? Thanks


Web Focus Developer Studio Release 7.6.1 Output formats include Excel, PDF, HTML, XML.
 
Posts: 25 | Registered: September 05, 2008Report This Post
Expert
posted Hide Post
Either MacGuyver or this should work for you. I will give you an example of using an alternate master with an OCCURS. Let's suppose that you have you have to print SERIAL, LASTNAME, FIRSTNAME, TELEPHONE on your form. And you need to do it twice and I'm going to leave the formatting up to you. First you start by duplicating the data such that it looks the same in a single row of a hold file.

DEFINE FILE filename
CNTR1/I1=1;
CNTR2/I1=2;
ROWCNTR/I4=ROWCNTR+1;
END
TABLE FILE filename
PRINT CNTR1 LASTNAME FIRSTNAME TELEPHONE
      CNTR2 LASTNAME FIRSTNAME TELEPHONE
BY ROWCNTR
ON TABLE HOLD FORMAT ALPHA
END
-RUN
?HOLD HOLD


Now that this is done, every row in your hold file has two copies of the data. Now we have to flip it.

APP FI ALTMAS DISK altmas.mas
-RUN
-WRITE ALTMAS FILENAME=HOLD,SUFFIX=FIX
-WRITE ALTMAS SEGNAME=ROWS,SEGTYPE=S0
-WRITE ALTMAS FIELDNAME=ROWCNTR,ALIAS=PLNTNM,FORMAT=I4,ACTUAL=I4,$
-WRITE ALTMAS SEGNAME=SERIAL,SEGTYPE=S0,PARENT=ROWS,OCCURS=2,$
-WRITE ALTMAS FIELDNAME=CNTR,ALIAS=CNTR,FORMAT=I1,ACTUAL=A1,$
-WRITE ALTMAS FIELDNAME=SERIAL,ALIAS=SRL,FORMAT=I8,ACTUAL=A8,$
-WRITE ALTMAS FIELDNAME=LASTNAME,ALIAS=LNM,FORMAT=A25,ACTUAL=A25,$
-WRITE ALTMAS FIELDNAME=FIRSTNAME,ALIAS=FNM,FORMAT=A20,ACTUAL=A20,$
-WRITE ALTMAS FIELDNAME=TELEPHONE,ALIAS=TEL,FORMAT=A10,ACTUAL=A10,$
APP FI ALTMAS DISK hold.ftm
TABLE FILE ALTMAS
PRINT LASTNAME FIRSTNAME TELEPHONE
BY SERIAL
BY CNTR PAGE-BREAK
whatever
END


What the OCCURS segment does is virtually restructure the data so that you are looking at it vertically as opposed to horizontally. You might have to play around with the order of the BY phrases and the page break but this technique is simple and has lots of applications. I used it myself just this week and I learned it over 20 years ago.

I'll be on vacation for a week in a few minutes but hopefully if there is something in this post that you don't understand or cannot translate to your problem, maybe one of the experts or virtuosos can help you out.

Good luck!


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
Member
posted Hide Post
The code below is generating the serial four times across but I'm having trouble getting it to flip in step 2 of this process. Can anyone see what is amiss? I really appreciate your help. Timpy

==========================

TABLE FILE CAR
PRINT
SERIAL
WHERE ( BATCH EQ &YEAR);
WHERE YEAR IN (&BATCH);
WHERE ( CANCEL EQ 0);
WHERE ( AREALOC EQ 0);
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS DUMPIT
END
-RUN
-*-EXIT
DEFINE FILE DUMPIT
CNTR1/I1=1;
CNTR2/I1=2;
CNTR3/I1=3;
CNTR4/I1=4;
ROWCNTR/I4=ROWCNTR+1;
END
TABLE FILE DUMPIT
PRINT
CNTR1 SERIAL
CNTR2 SERIAL
CNTR3 SERIAL
CNTR4 SERIAL
BY ROWCNTR
ON TABLE PCHOLD FORMAT PDF
END
-RUN
?HOLD HOLD HOLD HOLD
-*
APP FI DUMPIT DISK DUMPIT.mas
-RUN
-WRITE DUMPIT FILENAME=HOLD,SUFFIX=FIX
-WRITE DUMPIT SEGNAME=ROWS,SEGTYPE=S0
-WRITE DUMPIT FIELDNAME=ROWCNTR,ALIAS=PLNTNM,FORMAT=I4,ACTUAL=I4,$
-WRITE DUMPIT SEGNAME=SERIAL,SEGTYPE=S0,PARENT=ROWS,OCCURS=4,$
-WRITE DUMPIT FIELDNAME=CNTR1,ALIAS=CNTR,FORMAT=I1,ACTUAL=A1,$
-WRITE DUMPIT FIELDNAME=CNTR2,ALIAS=CNTR,FORMAT=I1,ACTUAL=A1,$
-WRITE DUMPIT FIELDNAME=CNTR3,ALIAS=CNTR,FORMAT=I1,ACTUAL=A1,$
-WRITE DUMPIT FIELDNAME=CNTR4,ALIAS=CNTR,FORMAT=I1,ACTUAL=A1,$
-WRITE DUMPIT FIELDNAME=SERIAL,ALIAS=LNM,FORMAT=A17,ACTUAL=A17,$
APP FI DUMPIT DISK hold.ftm
TABLE FILE DUMPIT
PRINT SERIAL
BY SERIAL
BY CNTR PAGE-BREAK
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET EMPTYREPORT ON
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,GRID=OFF,FONT='COURIER',SIZE=9,COLOR='BLACK',BACKCOLOR='NONE',STYLE=NORMAL,$
LEFTMARGIN = 0,$
TOPMARGIN = 0.125,$
TYPE=TITLE,STYLE=BOLD,$
TYPE=TABFOOTING,STYLE=BOLD,$
TYPE=SUBHEAD,BY=2,STYLE=BOLD,$
TYPE=SUBHEAD,BY=2,LINE=04,OBJECT=FIELD,ITEM=2,SIZE=09,STYLE=BOLD,COLOR='BLACK',$
TYPE=SUBHEAD,BY=2,LINE=05,OBJECT=FIELD,ITEM=2,SIZE=09,STYLE=BOLD,COLOR='BLACK',$
TYPE=REPORT,PAGESIZE=LETTER,$
ENDSTYLE
END


Web Focus Developer Studio Release 7.6.1 Output formats include Excel, PDF, HTML, XML.
 
Posts: 25 | Registered: September 05, 2008Report This Post
Silver Member
posted Hide Post
Here is a mere demonstration (with the CAR file
) of the technique I am using. First a file with n number of blank lines is created (where n is the number of times you would like to duplicate every row - in your case 2 ). Then you join your table to multiple blank in the created file ( the format of the BLANK_MAS must be FOCUS or you will get an error for duplicate rows ).
 
DEFINE FILE CAR
IND/I10 WITH MODEL = IND + 1;
BLANK/A1 WITH MODEL = '';
END
-RUN

TABLE FILE CAR
PRINT MODEL
IND
BLANK
ON TABLE HOLD AS TMP_FILE FORMAT FOCUS
END
-RUN

EX -LINES 4 EDAPUT MASTER,blank_mas,CV,FILE
FILENAME=BLANK_MAS, SUFFIX=FIX,$
SEGNAME=BLANK_MAS, $
  FIELD=FIELD1 ,ALIAS=  ,A1 ,A1 ,$

FILEDEF BLANK_MAS DISK blank_mas.mas (RECFM F LRECL 1

DEFINE FILE BLANK_MAS
CNT/I3 WITH FIELD1 = CNT + 1;
BLANK/A1 WITH FIELD1 = '';
END
-RUN

-* 8 - ORDER OF DUPLICATION
TABLE FILE BLANK_MAS
PRINT
FIELD1 NOPRINT
BLANK
WHERE CNT LE 8
BY BLANK NOPRINT
ON TABLE HOLD AS TMP_MAS1 FORMAT FOCUS INDEX BLANK
END
-RUN

JOIN BLANK IN TMP_FILE TAG T1 TO MULTIPLE BLANK IN TMP_MAS1 TAG T2 AS JJJ

TABLE FILE TMP_FILE
PRINT
*
END
-EXIT
 


WF 7.6.5 / OS: XP / FOCUS
 
Posts: 42 | Registered: September 01, 2008Report This Post
Member
posted Hide Post
GinnyJakes:

Step 1 - here is my code:
DEFINE FILE MNTITAPP
MSO/A3 = 'MSO';
MAKE/A10 = 'CHEVY';
LAST6/A6 = EDIT(SERIAL, '$$$$$$$$$$$999999');
CNTR1/I1=1;
CNTR2/I1=2;
ROWCNTR/I4=ROWCNTR+1;
END
-*
TABLE FILE MNTITAPP
PRINT CNTR1 MSO MAKE LAST6
CNTR2 MSO MAKE LAST6
BY ROWCNTR PAGE-BREAK
ON TABLE HOLD
END
-RUN

When testing this step by taking the "ON TABLE HOLD" off, the results are:
PAGE1
ROWCNTR CNTR1 MSO MAKE LAST6 CNTR2 MSO MAKE LAST6
1 1 MSO FORD A07343 2 MSO FORD A07343

Does this look correct so far? I appreciate your help with this new learning experience I am having.
Thanks


Web Focus Developer Studio Release 7.6.1 Output formats include Excel, PDF, HTML, XML.
 
Posts: 25 | Registered: September 05, 2008Report This Post
Expert
posted Hide Post
Yes, that looks fine except make your hold file FORMAT ALPHA. Keep on going.

Also, Martin gave you an example of using MacGuyver if you wanted to do that instead.


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
  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] Number of Copies

Copyright © 1996-2020 Information Builders