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.
I am using the following code in focus to generate a report.
TABLE FILE HOLD SUM CTRY AS 'COUNTRY' PRLIST AS 'PRICELIST' PLI AS 'ITEM' BY KEY NOPRINT PRINT AMT AS 'AMOUNT' TYP AS 'TYPE' QTY AS 'QUANTITY' ACROSS TARIFF BY KEY NOPRINT END
When I generate the report, for a particular KEY, various rows are displayed based on TARIFF (columns pertaining to only one TARIFF contains data at a time and others are blank). My requirement is to display a single row for the a particular KEY and various TARIFF (along with respective AMOUNT, TYPE and AUANTITY) to be displayed in the same row.
Posts: 39 | Location: Hyderabad, India | Registered: April 28, 2007
please update your signature in your profile. how to do that is explaned here
It is for us information about your platform and version.
Did you do any course to learn the language? Do you use the Developer Studio?
TABLE FILE HOLD
PRINT CTRY AS 'COUNTRY'
PRLIST AS 'PRICELIST'
PLI AS 'ITEM'
BY KEY
SUM AMT AS 'AMOUNT'
TYP AS 'TYPE'
QTY AS 'QUANTITY'
BY KEY
ACROSS TARIFF
END
I think this will give the proper result, if I have understand your question well.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
I have neither done any course to learn Focus language nor use the Developer Studio.
I have used the modified code, but still the output is same. I am geting mutiple rows for unique KEY, with one set of columns (AMOUNT, TYPE, QUANTITY) having data in each row, others being empty.
Posts: 39 | Location: Hyderabad, India | Registered: April 28, 2007
TARIFF
1 2 3
COUNTRY PRICELIST ITEM AMOUNT TYPE QUANTITY AMOUNT TYPE QUANTITY AMOUNT TYPE QUANTITY
-------------------------------------------------------------------------------------
ZZ 1 IT1 100 L 23
200 M 45
150 N 50
ZZ 1 IT2 134 L 10
30 M 15
and I want it like:
TARIFF
1 2 3
COUNTRY PRICELIST ITEM AMOUNT TYPE QUANTITY AMOUNT TYPE QUANTITY AMOUNT TYPE QUANTITY
-------------------------------------------------------------------------------------
ZZ 1 IT1 100 L 23 200 M 45 150 N 50
ZZ 1 IT2 134 L 10 30 M 15
FOCUS 7.2.3 Platform: IBM system Z9 Business class O/P formats: Flat files, excel and CSV files
Posts: 39 | Location: Hyderabad, India | Registered: April 28, 2007
Thank you very much Frank. Using SUM as both the verbs solved the problem.
I am having one more query, is it possible to get such kind of output as mentioned below if input file permits:
TARIFF
1 2 3
COUNTRY PRICELIST ITEM AMOUNT TYPE QUANTITY AMOUNT TYPE QUANTITY AMOUNT TYPE QUANTITY
-------------------------------------------------------------------------------------
ZZ 1 IT1 100 L 23 200 M 45 150 N 50
400 V 91
ZZ 1 IT2 134 L 10 30 M 15
205 Z 20
FOCUS 7.2.3 Platform: IBM system Z9 Business class O/P formats: Flat files, excel and CSV files
Posts: 39 | Location: Hyderabad, India | Registered: April 28, 2007
TABLE FILE HOLD
PRINT CTRY AS 'COUNTRY'
PRLIST AS 'PRICELIST'
PLI AS 'ITEM'
BY KEY
BY TYPE NOPRINT
SUM AMT AS 'AMOUNT'
TYP AS 'TYPE'
QTY AS 'QUANTITY'
BY KEY
BY TYPE NOPRINT
ACROSS TARIFF
END
That line should be there 2 times!
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006