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] Multiple COLUMNS as ROWS in a Single COLUMN !!!

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Multiple COLUMNS as ROWS in a Single COLUMN !!!
 Login/Join
 
<msam>
posted
Hi ,
I need multiple columns as rows in a single column. I need the multiple COLUMNS as ROWS in a single Column as shown below.

Example: for CAR FILE

CAR DEALER_COST
COUNTRY RETAIL-COST
MODEL
--------------------------------------
TOYOTA 25,000
JAPAN 30,000
1999

ON MODEL SUB-TOTAL AS :$$$$$$$$

Regards,
MSAM

This message has been edited. Last edited by: Kerry,
 
Report This Post
<msam>
posted
here is the correct display
CAR DEALER_COST
COUNTRY RETAIL-COST
MODEL
--------------------------------------
TOYOTA 25,000
JAPAN 30,000
1999
 
Report This Post
Virtuoso
posted Hide Post
Here is one possibility:

DEFINE FILE CAR
 BLANK/A1 = ' ';
END
-*
TABLE FILE CAR
 PRINT CAR AS ''
       DEALER_COST AS ''
  OVER COUNTRY AS ''
       RETAIL_COST AS ''
  OVER MODEL AS ''
  OVER BLANK AS ''
 ON TABLE SUBHEAD
  "CAR DEALER_COST"
  "COUNTRY RETAIL-COST"
  "MODEL"
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
The "correct display" doesn't look any different than the incorrect display!!! Put the program code and expected results between
[CODE]
[/CODE]
tags.

Example:
TABLE FILE CAR
SUM
CAR AS '' DEALER_COST AS '' OVER
COUNTRY AS '' RETAIL_COST AS '' OVER
MODEL AS '' 
BY CAR NOPRINT
BY COUNTRY NOPRINT
BY MODEL NOPRINT

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT=ARIAL, SIZE=8,
$
ENDSTYLE
END

Results:
ALFA ROMEO              4,915
ITALY                   5,925
2000 4 DOOR BERLINA
ALFA ROMEO              5,660
ITALY                   6,820
2000 GT VELOCE
ALFA ROMEO              5,660
ITALY                   6,820
2000 SPIDER VELOCE
AUDI                    5,063
W GERMANY               5,970
100 LS 2 DOOR AUTO
...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<msam>
posted
Hi Francis,
Thanks for the update. In this case how would I display the Titles for the columns.

Regards,
MSAM
 
Report This Post
Expert
posted Hide Post
Dan shows you one way to include the column titles. You can use styling to align the text:

TABLE FILE CAR
SUM
CAR AS '' DEALER_COST AS '' 
OVER
COUNTRY AS '' RETAIL_COST AS '' 
OVER
MODEL AS ''
COMPUTE BLANK1/A1=' '; AS '' 
OVER 
COMPUTE BLANK2/A1=' '; AS ''
COMPUTE BLANK3/A1=' '; AS ''
BY CAR NOPRINT
BY COUNTRY NOPRINT
BY MODEL NOPRINT

HEADING
"TEST REPORT 1"
"CAR <+0> DEALER COST"
"COUNTRY <+0> RETAIL COST"
"MODEL <+0> "

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=8,
$
TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, LINE=1, COLSPAN=2, $
ENDSTYLE
END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<msam>
posted
Hi Francis,
That resolves most of my questions. But is where a way to show only the cloumn GRID and not the row GRID when we set the GRID=OFF option

below code give me no GRID since I set it to OFF


TABLE FILE CAR
SUM
CAR AS '' DEALER_COST AS ''
OVER
COUNTRY AS '' RETAIL_COST AS ''
OVER
MODEL AS ''
COMPUTE BLANK1/A1=' '; AS ''
OVER
COMPUTE BLANK2/A1=' '; AS ''
COMPUTE BLANK3/A1=' '; AS ''
BY CAR NOPRINT
BY COUNTRY NOPRINT
BY MODEL NOPRINT

HEADING
"TEST REPORT 1"
"CAR <+0> DEALER COST"
"COUNTRY <+0> RETAIL COST"
"MODEL <+0> "

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=8,GRID=OFF,
$
TYPE=HEADING, HEADALIGN=BODY,$
TYPE=HEADING, LINE=1, COLSPAN=2, $
ENDSTYLE
END
 
Report 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] Multiple COLUMNS as ROWS in a Single COLUMN !!!

Copyright © 1996-2020 Information Builders