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     [CLOSED] Display the first column depending on a BY field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Display the first column depending on a BY field
 Login/Join
 
Platinum Member
posted
This might sound simple but for some reason I am getting stumped by it. I am trying to display the first column (country) depending if the second column (car) changes. Can someone please help me or point me in the right direction.

TABLE FILE CAR
PRINT 
SEATS
DEALER_COST
RETAIL_COST
BY COUNTRY 
BY CAR 
BY BODYTYPE 
END
-EXIT  


This is what I am getting in the first picture and in the second picture is what i want.

This message has been edited. Last edited by: <Kathryn Henning>,


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Virtuoso
posted Hide Post
Should be something like this


Print whatever
By country noprint
By car
By country

Now you have the car and country in the wrong columns but there is a setting to switch them.
I do not know that by head, but there will be anybody who does.




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
Gold member
posted Hide Post
quote:
TABLE FILE CAR
PRINT
SEATS
DEALER_COST
RETAIL_COST
BY COUNTRY
BY CAR
BY BODYTYPE
END
-EXIT


One way to do it:

 
TABLE FILE CAR
PRINT 
SEATS
DEALER_COST
RETAIL_COST
BY COUNTRY 
BY CAR 
BY BODYTYPE 
ON TABLE HOLD
END
-RUN
DEFINE FILE HOLD
NEWCONT/A10 = IF CAR EQ LAST CAR THEN '' ELSE COUNTRY;
NEWCAR/A16  = IF CAR EQ LAST CAR THEN '' ELSE CAR;
END
TABLE FILE HOLD
PRINT 
NEWCONT AS COUNTRY
NEWCAR AS CAR
BODYTYPE
SEATS DEALER_COST RETAIL_COST
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY BODYTYPE NOPRINT
END
-RUN
 


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Guru
posted Hide Post
Frank was talking about SEQUENCE. I forget about it myself because I hardly have the need to use it.

TABLE FILE CAR
PRINT 
   SEATS
   DEALER_COST
   RETAIL_COST
BY COUNTRY NOPRINT 
BY CAR
BY COUNTRY 
BY BODYTYPE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,PAGESIZE='Letter',LEFTMARGIN=0.250000,RIGHTMARGIN=0.250000,TOPMARGIN=0.250000,BOTTOMMARGIN=0.250000,SQUEEZE=ON,ORIENTATION=LANDSCAPE,$
TYPE=REPORT,FONT='ARIAL',SIZE=8,COLOR='BLACK',STYLE=NORMAL,LEFTGAP=0.05,RIGHTGAP=0.05,BORDER=LIGHT,$
TYPE=REPORT,COLUMN=N3,SEQUENCE=1,$
ENDSTYLE
END
-RUN  


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Member
posted Hide Post
I would go with:
 DEFINE FILE CAR
COUNTRY_CAR/A26 = COUNTRY || CAR;
END
TABLE FILE CAR
PRINT 
SEATS
DEALER_COST
RETAIL_COST
BY COUNTRY_CAR NOPRINT
BY COUNTRY 
BY CAR 
BY BODYTYPE 
END 
 
Posts: 18 | Registered: January 12, 2011Report This Post
Expert
posted Hide Post
quote:
but there is a setting to switch them.

Consider the use of SEQUENCE to place the display fields in the desired order.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Borrowed from Doug with a minor modification:

TABLE FILE CAR
PRINT DEALER_COST
BY COUNTRY NOPRINT 
BY CAR
BY COUNTRY
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=COUNTRY,SEQUENCE=1, $
TYPE=REPORT, COLUMN=CAR,    SEQUENCE=2, $
ENDSTYLE
END


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
 
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003Report 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     [CLOSED] Display the first column depending on a BY field

Copyright © 1996-2020 Information Builders