Friday, 29 July 2011

Minimizing IR Filters On Default Report

I had a requirement for an IR report that specified that the background colour of the rows be set to specific colours based on certain data values. To accomplish this the easiest way possible and to allow the user to "turn on" and "turn off" the colours, I created a series of IR filters.

Each filter is set to define the highlight colour based upon specified data:

The result is excellent. The rows are highlighted based on the specified criteria and the user can disable specific highlights if they wish. Obviously, these filters are saved as the default report.

But, my mother taught me to keep things clean and tidy. And, when you first open the report you are faced with a list of filters that you may or may not wish to alter. It makes the report screen rather busy and I wanted to temporarily hide the filters when the page first loads. Hmmmm - dynamic actions?

Here's the solution:

1.  Using the Advanced dynamic action wizard, create a new dynamic action and set the event to Page Load.

2.  Create a true action of type Execute Javascript Code.

3.  Enter the following for the javascript code:

/* Minimize IRR filters on page load*/
if( $('#apexir_CONTROLS_IMAGE').attr("src") == '/i/minus.gif') {

And, that's it!  A result that even my mother would approve of - everything neat and tidy!

The users can still access the filters by clicking on the "plus" sign and can just as easily hide them again.


  1. Great Idea but 1 question:
    1) is it realy smart 2 parse for the name of the collapsed icon? is there no other approach to find out wether the filter is already collapesd?

  2. I also think it is not good check what is image source.

    This should work

  3. Its really worth-able information for programmers to minimizing the IR filters as default report.
    Web Design Company India | Web Design Company Bangalore

  4. Very rare blog only have the this kind of information regarding Minimizing IR Filters On Default Report.Anyway I really grateful to this blog for providing this information.
    Web Designing Company | Web Design Company

  5. Filter section should have placed in every online shopping and ecommerce websites for get the actual products what customer want.
    Web Design London | London Web Design Company

  6. For best and cheap manual Seo services, Web designings. Must check Website Designing Company Bangalore

  7. The post is very nicely written and it contains many useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.
    Website Development Company Bangalore
    Website Design and Development Companies in Bangalore
    Outsource magento ecommerce services india

  8. I read this article. I think You put a lot of effort to create this article. I appreciate your work.
    thesis Writing Service