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') {
gReport.toggle_controls($x('apexir_CONTROL_PANEL_CONTROL'));
}
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.
Great Idea but 1 question:
ReplyDelete1) 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?
I also think it is not good check what is image source.
ReplyDeleteThis should work
if($("#apexir_CONTROL_PANEL_COMPLETE").is(":visible")){
gReport.toggle_controls($x("apexir_CONTROL_PANEL_CONTROL"));
}
Its really worth-able information for programmers to minimizing the IR filters as default report.
ReplyDeleteWeb Design Company India | Web Design Company Bangalore
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.
ReplyDeleteWeb Designing Company | Web Design Company
Filter section should have placed in every online shopping and ecommerce websites for get the actual products what customer want.
ReplyDeleteWeb Design London | London Web Design Company
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete