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     Bringing Multi Row data in One Row level...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Bringing Multi Row data in One Row level...
 Login/Join
 
Platinum Member
posted
i have data in this way...
Country Name Designation
USA Sam PM
USA Alan DPM
USA Pet GPM
i want data in this way...
Country PM DPM GPM
USA Sam Alan Pet

how to achieve this in...any clue ?

tks...sam


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
 
Posts: 133 | Registered: May 12, 2007Report This Post
Virtuoso
posted Hide Post
SUM
'PERSON NAME'
BY COUNTRY
ACROSS 'POSITION'

WHERE PERSON IS Sam and so on
POSITION is PM and so on.

Might work


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Leah's solution is correct, but only if your database holds only one person per country per position.
If you have more than one, you will only one of them.




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, 2006Report This Post
Platinum Member
posted Hide Post
That way column headers will come in a different way (read across field) But i need at same level...

nway, i have done in this way...

  
TABLE FILE B_SQL_PROJECTS
PRINT
     DST.NAME AS 'PNAME'
     DST.NUMBER AS 'PNUMBER'
     DST.TYPEOFBUILDING AS 'CYEAR'
     DST.TYPEOFCONSTRUCTION AS 'CMONTH'
     COMPUTE ENAME/A70 = FIRSTNAME || '' || LASTNAME; AS 'ENAME'
-*     COMPUTE DESG/A20= IF  DEFGROUPID EQ '134' THEN 'PM' ELSE IF DEFGROUPID EQ '139' THEN 'OSR' ELSE IF DEFGROUPID EQ '124' THEN 'DM' ELSE IF DEFGROUPID EQ '125' THEN 'REM' ELSE IF DEFGROUPID EQ '136' THEN 'DPM' ELSE 'OTHER'; AS 'DESG'
     DEFGROUPID
WHERE NUMBER EQ 'T212091' OR 'T211871' OR 'T212173' OR 'T202590';
-*WHERE READLIMIT EQ 1000
ON TABLE HOLD AS PCD1
END
-RUN
DEFINE FILE PCD1
PM/A70=IF DEFGROUPID EQ 134 THEN ENAME;
OSR/A70=IF DEFGROUPID EQ 139 THEN ENAME;
DM/A70=IF DEFGROUPID EQ 124 THEN ENAME;
REM/A70=IF DEFGROUPID EQ 125 THEN ENAME;
DPM/A70=IF DEFGROUPID EQ 136 THEN ENAME;
END
TABLE FILE PCD1
-*     ENAME
SUM
     PM
     OSR
     DM
     REM
     DPM
BY PNAME AS 'Project Name'
BY PNUMBER AS 'Project Number'
BY CYEAR AS 'Cycle Year'
BY CMONTH AS 'Cycle,Month'
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
END


Sam

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


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
 
Posts: 133 | Registered: May 12, 2007Report This Post
Virtuoso
posted Hide Post
Oh Please

I have to put the record straight here in case someone else sees this code and uses it.

This code itself is incorrect.
The output can/will relate unrelated records.

Also this is easily done in one pass, no need for a hold file.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Thanks for the warning Alan, I was just about to use it ...... Not Wink

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
What is PRINT DST.NAME supposed to do? Using DISTINCT with PRINT is redundant since PRINT uses the lowest level of detail. DST is only valid with SUM.

Also agree that this is really the LONG SCENIC route.


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
Virtuoso
posted Hide Post
PRINT DST. does actually work and is valid.

Try PRINT DST.BODYTYPE BY COUNTRY

Equivalent of BY COUNTRY BY MODEL.

The basic problem is the DEFINE in the second TABLE.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Platinum Member
posted Hide Post
I am not looking at displaying the data...hence across is not the solution...i want to change the dimensions of the data...i want columns (PM OSR DM REM DPM)...

i think the define is not bringing data into one level...but sum/by is taking care of that in last print ??


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
 
Posts: 133 | Registered: May 12, 2007Report This Post
Virtuoso
posted Hide Post
Why isn't ACROSS a solution, even if not displaying.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report 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     Bringing Multi Row data in One Row level...

Copyright © 1996-2020 Information Builders