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] Hide column

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Hide column
 Login/Join
 
Platinum Member
posted
I already check the posts http://forums.informationbuild...251058331#4251058331 and http://forums.informationbuild...351009331#4351009331.
None of this answer my question.

Because I want to hide the column if all values are null or 0.

Thanks in advanced,
Carlos Dias

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


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Virtuoso
posted Hide Post
You can do that by using a hold file. COnsider the next example on tha car file, where the field accel is checked to see if it is zero or not. By uncommenting one of the where's you can manipulate the outcome of the check, which will lead to either displaying the accel column or not.
TABLE FILE CAR
SUM   COMPUTE YESNO/I2 = IF ACCEL GT 0 THEN 1 ELSE 0;
WHERE DCOST GT 6000;
WHERE COUNTRY CONTAINS 'GERM';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-READ HOLD &YESNO.2.
-SET &ACCEL = IF &YESNO NE 0 THEN 'ACCEL' ELSE '';

TABLE FILE CAR
PRINT BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST
      SALES
      LENGTH
      FUEL_CAP
      BHP
      RPM
      MPG
      &ACCEL

BY    COUNTRY
BY    CAR
BY    MODEL
WHERE DCOST GT 6000;
WHERE COUNTRY CONTAINS 'GERM';
END
Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Thanks for the answer GamP,
But I can find a way to make it work.
The point is that I want to hide the column where all values are null (NODATA).
I already try to compare the compute value of the column with something like:
COMPUTE YESNO/I2 = IF COL GT 0 THEN 1 ELSE 0;

Thanks,
Carlos Dias


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Platinum Member
posted Hide Post
I have try several approaches but without success.

My report definition is:
  
TABLE FILE MYTABLE
SUM 
     AVE.COL1
     AVE.COL2
     AVE.COL3
BY  DATE AS 'Data'
ACROSS LOWEST SUBSERVICE 
WHERE ( YEAR EQ &YEAR.(FIND YEAR,YEAR IN MYTABLE).YEAR. )
WHERE SERVICE EQ 'A' OR 'B';
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML


Service "A" has sub-services A1 and A2. And service "B" has sub-services B1 and B2.

When sub-services are of type "A1" or "A2" only the columns COL1 and COL2 has values. When is of type "B1" or "B2" only the column COL3 has values.

In practice what I want is to hide/show columns depending on the type of the sub-services.

Thanks,
Carlos Dias


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Virtuoso
posted Hide Post
But if both records of type A and B are in the result, you'll always have three columns (2 for type A and one for type B). What you could do in this case is to create a defined field that holds one of the values for either type A or type B and use that in the across. Something like:
DEFINE FILE MYTABLE
REPCOL/D12.2 = IF SERVICE EQ 'A' THEN COL1 ELSE COL3;
END
TABLE FILE MYTABLE
SUM 
     AVE.REPCOL
     AVE.COL2
... etc
Would this be an option for you?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
yOU COULD TRY THIS:

DEFINE FILE MYTABLE
COL/I1=IF SUBSERVICE EQ 'A1' OR 'B1' THEN 1
ELSE 2;
END
TABLE FILE MYTABLE
SUM
AVE.COL1
AVE.COL2
AVE.COL3
BY DATE AS 'Data'
BY SERVICE SUBHEAD
"Service ACROSS COL NOPRINT
WHERE ( YEAR EQ &YEAR.(FIND YEAR,YEAR IN MYTABLE).YEAR. )
WHERE SERVICE EQ 'A' OR 'B';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
Or try this

Now you in fact have two request, firts for the A value and secodn for the B value.


TABLE FILE MYTABLE
SUM
AVE.COL1
AVE.COL2
AVE.COL3
BY DATE AS 'Data'
ACROSS LOWEST SUBSERVICE
WHERE ( YEAR EQ &YEAR.(FIND YEAR,YEAR IN MYTABLE).YEAR. )
WHERE SERVICE EQ 'A' ;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

TABLE FILE MYTABLE
SUM
AVE.COL1
AVE.COL2
AVE.COL3
BY DATE AS 'Data'
ACROSS LOWEST SUBSERVICE
WHERE ( YEAR EQ &YEAR.(FIND YEAR,YEAR IN MYTABLE).YEAR. )
WHERE SERVICE EQ 'B' ;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END


And if you have more than only the A and B, you might go for a looping through all those values and make split reports for each.




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
Thanks for all answers.
But unfortunately none of then answer my question.

Because I want to show in just one report the values of service 'A' and 'B'.
Like I said before some column value exist in one and not the other.
Maybe I can use the last suggestion if I can, don't know how, join the two reports.


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Platinum Member
posted Hide Post
quote:
COMPUTE YESNO/I2 = IF COL GT 0 THEN 1 ELSE 0;


Carlos, so then your values can never be negative? Otherwise your compute will yield you a false positive,
ira


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
 
Posts: 195 | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
I already try this approach without success.

Here is an example of what a get:


For Sub Service "A1" and "A2" I want to hide the column "COL3" in green.
For Sub Service "B1" and "B2" I want to hide the column "COL1" and "COL2" in orange.

Thanks in advanced,
Carlos Dias


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Platinum Member
posted Hide Post
My problem is similar to the one post in http://forums.informationbuild...101077422#1101077422

Carlos Dias


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Expert
posted Hide Post
I think the easiest way to achieve this is to convert the ACROSS values to columns then test as specified above.


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
Virtuoso
posted Hide Post
Or upgrade to the 7702 release. That has a setting that will automatically hide the acrosscolumns that have nulls in every row of data. SET HIDENULLACRS=ON will do exactly what you need, but as I said, it is available as of 77.02.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
GamP,
I tried this approach but only works if I have one column to sum by across. In may case I have 3 or 2.

Bu thanks anyway.


WebFOCUS version: 7.6
Linux/Windows
HTML, Excel
 
Posts: 127 | Location: Aveiro, Portugal | Registered: February 04, 2011Report This Post
Virtuoso
posted Hide Post
Carlos, Try the following code. This seems to give you an example of how to do what you would like to do. The second TABLE FILE is what you need. I included the first TABLE FILE to duplicate your formatting issue.

DEFINE FILE CAR
TWOSEATS/D12=IF (SEATS EQ 2) THEN RETAIL_COST ELSE 0;
FOURSEATS/D12=IF (SEATS EQ 4) THEN RETAIL_COST ELSE 0;
FIVESEATS/D12=IF (SEATS EQ 5) THEN RETAIL_COST ELSE 0;
COLNUM/I1 =DECODE SEATS(2,1,4,1,5,2 ELSE 3);
END

TABLE FILE CAR
SUM TWOSEATS FOURSEATS FIVESEATS
BY COUNTRY
BY CAR
ACROSS BODYTYPE
ACROSS SEATS
WHERE (BODYTYPE EQ 'CONVERTIBLE' OR 'SEDAN')
END

TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
ACROSS BODYTYPE
ACROSS COLNUM NOPRINT
ACROSS SEATS
WHERE (BODYTYPE EQ 'CONVERTIBLE' OR 'SEDAN')
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Carlos, You will also need to do this on a HOLD FILE that contains the AVE values already calculated. Do a TABLE FILE on your data using the AVE prefix operator on your fields and sort with just BY phrases, no ACROSS. HOLD the results and then add the DEFINE FILE section to your HOLD FILE and run the report off the HOLD FILE. That should do it.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Carlos,

Here is another example closer to what I was trying to say you need to do.

DEFINE FILE CAR
TWOSEATS/D12=IF (SEATS EQ 2) THEN RETAIL_COST ELSE 0;
FOURSEATS/D12=IF (SEATS EQ 4) THEN RETAIL_COST ELSE 0;
FIVESEATS/D12=IF (SEATS EQ 5) THEN RETAIL_COST ELSE 0;
END

TABLE FILE CAR
SUM AVE.TWOSEATS AVE.FOURSEATS AVE.FIVESEATS
BY COUNTRY
BY CAR
BY BODYTYPE
BY SEATS
WHERE (BODYTYPE EQ 'CONVERTIBLE' OR 'SEDAN')
ON TABLE HOLD AS HOLD001
END

DEFINE FILE HOLD001
COLNUM/I1 =DECODE SEATS(2,1,4,1,5,2 ELSE 3);
COLVAL/D12 =IF (COLNUM EQ 1) AND (SEATS EQ 2) THEN TWOSEATS ELSE
IF (COLNUM EQ 1) AND (SEATS EQ 4) THEN FOURSEATS ELSE
IF (COLNUM EQ 2) AND (SEATS EQ 5) THEN FIVESEATS ELSE 0;
END

TABLE FILE HOLD001
SUM COLVAL
BY COUNTRY
BY CAR
ACROSS BODYTYPE
ACROSS COLNUM NOPRINT
ACROSS SEATS
WHERE (BODYTYPE EQ 'CONVERTIBLE' OR 'SEDAN')
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 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] Hide column

Copyright © 1996-2020 Information Builders