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] Subhead across

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Subhead across
 Login/Join
 
Gold member
posted
hi,
Is there a way to achieve this kind of layout?

Table EMP has
Ename, salary and Dept columns
The Output should be:

Dept1 Dept2 dept3
Ename1 Sal1 ename2 sal2 ename3 sal3

10 20 30
Tim 200 Tom 100 Lee 300
Jim 100 Mike 100
Joy 200
Jer 500

Basically looking for DEPT to print Across and print the employee details under that Dept.

Thanks,
DD

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


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Expert
posted Hide Post
Have you looked at the ACROSS command ?

TABLE FILE CAR
SUM SALES
BY CAR
ACROSS COUNTRY
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
To get the output that you would like, you will have to use the ACROSS phrase as Waz mentions, but you will have to do a little extra processing to achieve your final output.

Consider this -
TABLE FILE CAR
  LIST RCOST
    BY COUNTRY
    BY CAR
ON TABLE HOLD AS TEMPHLD1
END
TABLE FILE TEMPHLD1
   SUM CAR
       RETAIL_COST
    BY LIST NOPRINT
ACROSS COUNTRY
END

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
Gold member
posted Hide Post
DD, I think this should help for what you are looking.... Smiler

 TABLE FILE EMPDATA
PRINT
FIRSTNAME
DEPT
SALARY
ON TABLE HOLD AS EMPDATA1
END


TABLE FILE EMPDATA1
PRINT
FIRSTNAME
SALARY
ACROSS  DEPT
END
 


WebFocus7.6.2, WebFocus 7.1.1,Windows
HTML, PDF and Excel
 
Posts: 71 | Registered: June 30, 2009Report This Post
Virtuoso
posted Hide Post
Tony - an ingenious solution.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
Why, thank you Dan! Smiler

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Thanks Alot Tony!!!!
Your solution worked great and thatswhat I wanted.

Anmol: Your solution is a kind of matrix output, but unfortunately its not the type of output Iam looking for. Thanks for helping.

Once again Thanks to All who looked into this thread.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Gold member
posted Hide Post
Tony,
Can I put a Subheading, I mean sub-sectioning these rows further and change the column titles based on the Company name column?
10 20 30
Comp1 St date comp1 St date
Tom 01/01/09 Lee 01/13/09
Tim 02/12/08 Comp2 End Date
Comp2 End Date Jim 01/23/06
Joe 03/01/07

Thanks,
DD


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Expert
posted Hide Post
DD,

Owing to the fact that your sample is compacted, I cannot understand exactly what you mean.

To preserve spacing in your sample place the sample between [ code] and [ /code] tag pairings (without the spaces).

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
Gold member
posted Hide Post
    10                20             30
Comp1  St date    Comp1  St date
Tom    01/01/09   Lee    01/13/09
Tim    02/12/08   Comp2  End Date
Comp2  End Date   Jim    01/23/06
Joe    03/01/07


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Gold member
posted Hide Post
Sorry Tony...
Please check it now.

Thanks Alot.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Expert
posted Hide Post
You'll not get exactly like that unless you handle the data multiple times and, unless you have a desparate reason to get exactly that output, I would settle for something like this -

APP PREPENDPATH IBISAMP
DEFINE FILE EMPDATA
  NAME/A26 = FIRSTNAME || (' ' | LASTNAME);
END
TABLE FILE EMPDATA
   SUM HIREDATE/DMYY
       COMPUTE LIST/I9 = IF DEPT NE LAST DEPT THEN 1 ELSE
                         IF DIV  NE LAST DIV  THEN 1 ELSE LAST LIST + 1;
    BY DEPT
    BY DIV
    BY NAME
WHERE DEPT IN ('MARKETING','PERSONNEL','SALES')
WHERE DIV  NE 'CORP'
ON TABLE HOLD AS TEMPHLD1
END
TABLE FILE TEMPHLD1
   SUM NAME
       HIREDATE
    BY DIV  NOPRINT
    BY LIST NOPRINT
ACROSS DEPT AS ''
ON DIV SUBHEAD
"Division <DIV"
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
  TYPE=REPORT, COLUMN=NAME(*), BORDER-LEFT=LIGHT, BORDER-RIGHT=OFF, $
  TYPE=REPORT, COLUMN=HIREDATE(*), BORDER-RIGHT=LIGHT, $
  TYPE=REPORT, ACROSSCOLUMN=DEPT, BORDER-RIGHT=LIGHT, $
  TYPE=SUBHEAD, BORDER-BOTTOM=LIGHT, $
ENDSTYLE
END

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
  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] Subhead across

Copyright © 1996-2020 Information Builders