Focal Point
how to reuse/access the simple matrix report columns
August 26, 2009, 08:28 AM
Gopalhow to reuse/access the simple matrix report columns
I have created a simple matrix report similar to the one below and i want to store the output in a HOLD file to report against it.
when i tried print * its working fine with different column names with spaces however, When i tried to print or set alias for those columns i am getting an error: THE FIELDNAME IS NOT RECOGNIZED
Actually i having 4 values against Across columns how can i print or set alias for this across columns in HOLD file?
Kindly assist me.....
Below is the sample code for your refernce
TABLE FILE EMPLOYEE
SUM CURR_SAL
BONUS
ACROSS DEPARTMENT
BY CURR_JOBCODE
ON TABLE HOLD AS HLD_MATRIX FORMAT FOCUS
END
TABLE FILE HLD_MATRIX
PRINT
'HLD_MATRIX.SEG01.CURR_SAL' AS 'NAME1'
'HLD_MATRIX.SEG01.BONUS' AS 'NAME2'
END
(Using WF 769)
WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
August 26, 2009, 09:55 AM
GamPYour field names are probably influencd by the ASNAMES setting.
You can find out what the fieldnames in your master are by issueing the command
TYPE HLD_MATRIX.MAS
immediately after your first table request.
It will show you exactly what fieldnames have been created.
You'll get one set of field names for each value of the across field.
GamP
- Using AS 8.2.01 on Windows 10 - IE11. |
| in Focus since 1988 |
August 26, 2009, 09:58 AM
Francis MarianiIf you execute this command after holding the file
?FF HLD_MATRIX
you will see that the ACROSS affects how the column names are generated.
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
August 26, 2009, 10:23 AM
Gopalquote:
?FF HLD_MATRIX
Thank you.
Francis,
Below is my output against ?FF
APP S04 E01 A15V
APP V04 E02 A15V
APPGSDB E03 A15V
APPSUPPLIER MGMT E04 A15V
it seems actual column has spaces so i tried using E01 as column name and it worked. Is that a right way?
Please advice.
WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
August 26, 2009, 12:18 PM
Tom FlynnWhen HOLDing data with ACROSS,
do not FORMAT FOCUS:
TABLE FILE EMPLOYEE
SUM
CURR_SAL
COMPUTE BONUS/P7.2 = CURR_SAL*.05;
ACROSS DEPARTMENT
BY CURR_JOBCODE
ON TABLE HOLD AS HLD_MATRIX
END
-RUN
TABLE FILE HLD_MATRIX
PRINT
CURR_SAL AS 'NAME1'
BONUS AS 'NAME2'
END
-EXIT
hth
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 27, 2009, 09:20 AM
GopalThank you Flynn!
Can you please advice the impact of it so that it will be helpful in future scenarios...
WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF
August 27, 2009, 10:01 AM
Francis MarianiIf the ACROSS column has blanks in its value, the column name will have blanks in it. To specify a column name with blanks, use '' or use the alias E99.
SET ASNAMES=ON
TABLE FILE CAR
SUM SALES
ACROSS COUNTRY
BY SEATS
ON TABLE HOLD AS H001 FORMAT ALPHA
END
?FF H001
TABLE FILE H001
PRINT 'SALW GERMANY'
END
---
FORMAT FOCUS does not name the columns based on the data! You will end up with a pile of columns with the same name (different E99 aliases though). (This I find very surprising!)
SET ASNAMES=ON
TABLE FILE CAR
SUM SALES
ACROSS SEATS
BY COUNTRY
ON TABLE HOLD AS H001 FORMAT FOCUS
END
?FF H001
Change "FOCUS" to "ALPHA" to see the difference.
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
August 27, 2009, 10:14 AM
Gopali am getting completely reverse when i am having FORMAT FOCUS i am getting different column name with additional column 'FOCLIST'
whereas when it is FORMAT ALPHA or without format i am getting pile of columns with the same name!
WebFOCUS 769, Windows XP platform and Output formats: HTML,excel, PDF