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] conditional hiding a record

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] conditional hiding a record
 Login/Join
 
Gold member
posted
Hi
I have 1 to 10 records in output. I don't want display the entire 9th record(row)in report.Is there any conditional masking or hiding a particular row.
This is HTML output,Report painter.
Any ideas,
thanks
rama

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


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Virtuoso
posted Hide Post
You could define a counter field and filter the 9th record out in your report.

DEFINE FILE CAR
CTR/I4 WITH MODEL = CTR + 1;
END
TABLE FILE CAR
PRINT CTR
      COUNTRY
      CAR
      MODEL
WHERE CTR NE 9
END


- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Oh wait, do you want to keep the record in the request (to be used in subtotals and whatnot) but not show it?

May it be possible to define an external CSS class with display:none (or something like that, I'm not an expert in CSS) and try to attach that to the <TR> element that WF creates for each row by tweaking some of the definitions in the STYLE section? I haven't done that before but it might be feasible.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Thank you so much for a wonderful hint.
rama


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Virtuoso
posted Hide Post
Something like this perhaps?

DEFINE FILE CAR
CTR/I4 WITH MODEL     = CTR + 1;
END
TABLE FILE CAR
PRINT 
      CTR
      COUNTRY
      MODEL
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOPAGE
ON TABLE HOLD AS HOUT FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=REPORT, BORDER=LIGHT, $
TYPE=DATA, CLASS='hide_me', WHEN=CTR EQ 9, $
ENDSTYLE
END
-RUN
-*
-HTMLFORM BEGIN
<html><head><title>Hidden Row</title>
<style type="text/css">
   .hide_me {display: none;}
</style>
</head>

<body>!IBI.FIL.HOUT;</body>
</html>
-HTMLFORM END


Technically it is not hiding the table row but each independent cell instead although it seems that when no output is displayed the whole row collapses onto the surrounding ones.

It looks OK in Internet Explorer 6 but you may need to test it with your specific browser.

IF you need to hide the actual table row (in case your browser is not as forgiving as IE) you may write a piece of Javascript code to browse through the HTML table and assign a className of "hide_me" to the table row element whose first cell has "hide_me" as their assigned class.

Hope that helps,
- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Interesting solution, but if you have a total sum at the end of the report and a field like "sales" in the output. the sum is not correct anymore.
It will sum also the hidden row.




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
Virtuoso
posted Hide Post
Hi Frank, that was precisely the idea. Since I don't know really how the report is to be used, I offered both choices:

1. Excluding the record altogether from the request (WHERE CTR NE 9)

2. Leaving the record there but hiding it in case this assumption was true:

quote:
do you want to keep the record in the request (to be used in subtotals and whatnot) but not show it?


Maybe Rama can step in and provide us more details as to what is indeed needed and how she is planning to use the report? That way we can be better equipped to provide something more useful.

- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Thanks a ton for solution provided, I was looking at the first solution provided as I need to show only the totals of the once that are displayed

Thank you again


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Gold member
posted Hide Post
quote:

PRINT CTR
COUNTRY
CAR
MODEL
WHERE CTR NE 9


When I use a Computed field in teh where conditions The report dies with the message
(FOC732) COMPUTED FIELDS CAN ONLY BE REFERENCED IN A WHERE TOTAL

Is there any way I can use computed fields in the where condition


WebFOCUS 762
Windows
To be decided(All formats)
 
Posts: 52 | Registered: November 02, 2009Report This Post
Virtuoso
posted Hide Post
WebFOCUS already gave you the answer Smiler

You *can* create a WHERE condition on COMPUTE fields but only based on the aggregated value of such field (which is what TOTAL means in that case). This makes more sense with a SUM verb:

TABLE FILE CAR
SUM
      RETAIL_COST
COMPUTE COMM/D12.2 = RETAIL_COST * 0.01;
BY COUNTRY
WHERE TOTAL COMM GT 100
END


If you were to be using a PRINT verb then it would make sense to move your COMPUTE'd field into a DEFINE FILE section and then filter naturally on it (such as I did in the original sample code I provided you with).

Regards,
- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
Why not just eliminate the unwanted rows by screening them out in the first place and putting the rest (the "wanted" rows) in a HOLD file and reporting from the HOLD file? It seems that "masking" is just adding complications to the issue...




   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
Member
posted Hide Post
is there any ways to mask rows in excel report on conditions? Please help me!

I want to hide the rows and display title and subhead alone in excel report. Is it possible to do?


Webfocus 7.6
Excel, HTML, PDF
 
Posts: 13 | Registered: May 23, 2013Report This Post
Master
posted Hide Post
Hi,

Subject says its SOLVED. So start new discussion to get better response.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report 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] conditional hiding a record

Copyright © 1996-2020 Information Builders