Oracle Apex Interactive Report Repeating Header

APEX-Oracle-Application-Express So the absolute best part of Oracle Apex is the Interactive Report. It is easy to create, and most importantly, easy for the users to customize. However, one thing I constantly run to when the number of rows exceeds more than just a few is that the headers scroll off the screen.  You then loose easy access to the user controls contained in the header, and you have no reference to tell one column from the other.  There are a couple of solutions to this:

  • Paging: This would do it but I personally hate paging.  Just try getting to the letter “Q” in an alphabetized paged list with 30 pages and you will understanding why.  In my mind the only reason to use paging is for memory or performance issues.
  • Fixed Headers:  For me this would be the ideal solution and I almost got it working (here is my attempt on gist).  It was based upon the UltimateScrollingTable idea.  Unfortunately the scrolling technique was incredibly slow on Safari and with long tables hung the browser.  I ran out of time and energy for this one, but if you want to try a hand at it please do so and let me know how it goes (and more importantly give me your code).
  • Repeating Header:  So this is what I finally landed on and here is the file on gist.  Basically this solution simply copies the header row and then inserts it again into the table every X number of rows.  In concept it is actually quite simple, but there were a few things that I had to solve:
    • Position the header controls on the correct row
    • Reinitialize when ajax call made
    • Handle instance when user decides to group componets

So if you are too lazy to go to gist, here is the code: