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] More control over BYDISPLAY

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] More control over BYDISPLAY
 Login/Join
 
Member
posted
I have a report requirement that I can describe using the CAR table as an example.

I want to do:

  
PRINT SEATS
BY COUNTRY
BY CAR
BY MODEL
ACROSS BODYTYPE
END


But I want to show the Country every time it or the Car changes.

This message has been edited. Last edited by: FP Mod Chuck,


7706 gen 902; Windows 10
 
Posts: 14 | Registered: April 12, 2017Report This Post
Member
posted Hide Post
For more clarification ...
Here's what it gives me now:


And here's what I want:

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


7706 gen 902; Windows 10
 
Posts: 14 | Registered: April 12, 2017Report This Post
Expert
posted Hide Post
Welcome to the forum...

Check out the BYDISPLAY command.
ON : Shows all BY fields.
Off: Does not show all BY fields.

I hope this helps.

BTW: Please use the red < / > tags, upper right of this pop-up, to display your code.




   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
Expert
posted Hide Post
Michael, I don't see the images you posted - I don't think we can see http://content.fulcircle.com/F...BYDISPLAY_before.png


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
Member
posted Hide Post
Please try it now. I've changed the URL.


7706 gen 902; Windows 10
 
Posts: 14 | Registered: April 12, 2017Report This Post
Member
posted Hide Post
Doug,

With BYDISPLAY=OFF, it shows the COUNTRY, CAR, and MODEL data only when the corresponding data changes.

With BYDISPLAY=ON, it shows all data on every line.

What I'm looking for is different. I want it to be just like BYDISPLAY=OFF, except that I want COUNTRY data to show when either the COUNTRY data changes or the CAR data changes.


7706 gen 902; Windows 10
 
Posts: 14 | Registered: April 12, 2017Report This Post
Expert
posted Hide Post
I think its Define Time...


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
quote:
I think its Define Time...
Me too...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Silver Member
posted Hide Post
Michael,

Try this,
TABLE FILE CAR
PRINT SEATS
BY COUNTRY
BY CAR
BY MODEL
ACROSS BODYTYPE
ON TABLE HOLD AS HCAR
END
?FF HCAR
TABLE FILE HCAR
PRINT 
COMPUTE N_COUNTRY/A20 = IF CAR EQ LAST CAR THEN '' ELSE COUNTRY; AS 'COUNTRY'
COMPUTE N_CAR/A16     = IF CAR EQ LAST CAR THEN '' ELSE CAR;     AS 'CAR'
MODEL
E04 AS 'CONVERTIBLE'
E05 AS 'COUPLE'
E06 AS 'HARDTOP'
E07 AS 'ROADSTER'
E08 AS 'SEDAN'
END  


Thanks,
Pku

Focus, WebFocus 8201 on Windows
 
Posts: 43 | Registered: May 28, 2008Report This Post
Platinum Member
posted Hide Post
Does something like this work for you?
 DEFINE FILE CAR
 COUNTRYCAR/A26 = COUNTRY | CAR;
 END

 TABLE FILE CAR
    SUM SEATS
     BY COUNTRYCAR NOPRINT
     BY COUNTRY
     BY CAR
     BY MODEL
 ACROSS BODYTYPE
 END


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Virtuoso
posted Hide Post
Different technique where you don't have to care about the ACROSS alias and value (E04, E05, ...) which you may not know and may change depending on the number of ACROSSed value in the Hold file (reason why Pku have used the &FF HCAR to know how many have been hold).

DEFINE FILE CAR
CNTRYID/I2  = IF CAR EQ LAST CAR THEN CNTRYID  ELSE CNTRYID + 1;
N_CNTRY/A20 = IF CAR EQ LAST CAR THEN ''       ELSE COUNTRY;
CARID  /I2  = IF CAR EQ LAST CAR THEN CARID    ELSE CARID + 1;
N_CAR  /A16 = IF CAR EQ LAST CAR THEN ''       ELSE CAR;
END
TABLE FILE CAR
SUM SEATS

BY COUNTRY NOPRINT
BY CNTRYID NOPRINT
BY HIGHEST N_CNTRY AS 'COUNTRY'
BY CARID   NOPRINT
BY HIGHEST N_CAR   AS 'CAR'
BY MODEL
ACROSS BODYTYPE AS ''
END
-RUN


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Or simply

. . .
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY COUNTRY
BY CAR
BY MODEL
. . .

Whenever a sort (BY) object has a sort-break, so do all the lower-level sort objects. So if our #1 or #2 (COUNTRY, CAR) changes, #3 through #5 will be displayed.

There is no need to keep the sort object names distinct, and thus no need for Define -- unless you want to reference the second COUNTRY or CAR columns by name in ON phrases or in STYLE.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
quote:
Or simply

. . .
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY COUNTRY
BY CAR
BY MODEL
. . .


Good One


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
Member
posted Hide Post
Jack Gross,
Good one, indeed!

Doug, in a previous post, says, "Whatever they want. Heck Yeah, We can do that in WebFOCUS! "
I started working with WebFocus about 4 years ago. As a "novice", I was often dismayed by its complexity. About 3 months ago, I graduated to "beginner" by creating several very complex reports. It's then that I started believing Doug's adage.
This report was the most complex yet. And I really got stumped with the problem I described in this thread. Now, even more, I believe what Doug says.
Not only that ...
I really appreciate this forum.


7706 gen 902; Windows 10
 
Posts: 14 | Registered: April 12, 2017Report This Post
Master
posted Hide Post
quote:
...I started working with WebFocus about 4 years ago. As a "novice", I was often dismayed by its complexity. About 3 months ago, I graduated to "beginner" by creating several very complex reports. It's then that I started believing Doug's adage...

+1
 
Posts: 822 | Registered: April 23, 2003Report This Post
Platinum Member
posted Hide Post
j.gross very nice.


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report 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] More control over BYDISPLAY

Copyright © 1996-2020 Information Builders