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]Hide expandable sign in accordion report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Hide expandable sign in accordion report
 Login/Join
 
Member
posted
Hi,
In my Accordion report , i just want to hide few records from expansion (showing details part ). Eg: In Car sales table, there are column values like Audi, BMW, Jaguar, Toyota. Here Jaguar and Toyota should not be expandable. Please help me out.

This message has been edited. Last edited by: <Emily McAllister>,


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Platinum Member
posted Hide Post
Hmm good question.. as far as I know the accordion button is either there for every row/or not. I have not come across any other options/examples where this is different. I do believe it would be a good NFR for IBI to have an option where it does not show when there are no lines under the button for example.


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
 
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011Report This Post
Member
posted Hide Post
Thanks for the reply. Any other suggestions apart from focus coding like javascript, css etc.


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Platinum Member
posted Hide Post
Hi Hemin,

Please refer below link

http://forums.informationbuild...=999104622#999104622

and sample code

TABLE FILE CAR
PRINT
SALES
COMPUTE HIDE/A1=IF SALES EQ 0 THEN 'Y' ELSE 'N'; NOPRINT
BY COUNTRY NOPRINT
ON COUNTRY SUBHEAD
"ON TABLE HOLD AS H001 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=DATA, CLASS=NS, WHEN=HIDE EQ 'Y', $
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN

!IBI.FIL.H001.HTM;
-HTMLFORM END

Thanks
Neelima


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Member
posted Hide Post
Thanks Neelima... and sorry too for late reply. Was off for few days. Smiler


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Expert
posted Hide Post
If specific values should not be expandable, it would be of little use "hiding" the "clickable" gif upon which the event is fired. You would really need to remove the event for the specific values - and that would be difficult to achieve depending upon your requirements and how much the report data varies.

So, how about removing the resultant row detail for those specific values? This would be much easier to control entirely within WebFOCUS without having to concoct some complex JavaScript (most likely) method to remove the image and events for specific nodes.

Would this approach satisfy the requirement? Instead of MISSING for D_MODEL, you could output "NOT PERMITTED" or similar?

SET NODATA = ''
DEFINE FILE CAR
  D_MODEL/A25   MISSING ON = IF CAR IN ('JAGUAR','TOYOTA') THEN MISSING ELSE MODEL;
  D_RCOST/D12.2 MISSING ON = IF CAR IN ('JAGUAR','TOYOTA') THEN MISSING ELSE RETAIL_COST;
  D_DCOST/D12.2 MISSING ON = IF CAR IN ('JAGUAR','TOYOTA') THEN MISSING ELSE DEALER_COST;
END

TABLE FILE CAR
  SUM D_RCOST
      D_DCOST
   BY COUNTRY
   BY CAR
   BY D_MODEL
ON TABLE SET EXPANDABLE ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  grid=off, font=calibri, size=9, $
ENDSTYLE
END
-RUN

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Tony A , thanks for the consideration .Removing resultant wouldn't satisfy the requirement.


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Expert
posted Hide Post
Using jQuery, here is some JS that hides the accordion button and hyperlink anchor for a specific row. The JS is in a file that is attached to the Accordion report using ON TABLE SET JSURL 'jsFileName.js'.

For one row, I am selecting by content, in the other row, I am selecting by ID.

$(document).ready(function()
{
    // if "Star Trek" Level 2 section row exists, hide the accordion button and hyperlink anchor
    $( "td:contains('Star Trek'):not(:contains('Star Trek Transfer'))" ).each( function()
    {
        $( this ).find( "img" ).css("visibility", "hidden" );
        $( this ).find( "a"   ).css("visibility", "hidden" );
    });

    // if "Klingon Forwards" Level 1 section row exists, hide the accordion button and hyperlink anchor and remove the lower level rows
    $( "#by_2" ).each( function()
    {
        // hide the accordion button and hyperlink anchor to the lower level rows
        $( "#by_2 img"     ).css("visibility", "hidden" );
        $( "#by_2 a:first" ).css("visibility", "hidden" );

        // remove lower level rows (created as requirement of Accordion report)
        $( "tr[ibiattr^='by_2']" ).remove();
    });
});

Read up on jQuery selectors ...

This message has been edited. Last edited by: Francis Mariani,


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
Expert
posted Hide Post
Smiler You can always rely on Francis to come up with the goods - he just can't help himself - which is why he and other members make this forum one of the best!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Note: The jQuery that Francis gives works excellently with EXPANDABLE = ON but not with EXPANDBYROW.

But then he's given the idea, you just have to work with it!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
I always forget about EXPANDBYROW. I've been at it for a long time and I've never created an EXPANDBYROW accordion report. I'm fairly sure it would be possible to use a jQuery selector for these types of reports, though you could probably use native JavaScript: Sitepoint: Native JavaScript Equivalents of jQuery Methods: the DOM and Forms


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
  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]Hide expandable sign in accordion report

Copyright © 1996-2020 Information Builders