Skip to Main Content

APEX 4: Classic report horizontal scroll with fixed columns

I did write small jQuery plugin to freeze classic report columns and scroll report horizontally. Idea for this did come from OTN forum post. Big thanks to Andy for helping and original example.

You can download jQuery plugin from here. Assumption is that classic report template Before Rows is like:

<table cellpadding="0" border="0" cellspacing="0" summary="" #REPORT_ATTRIBUTES# id="report_#REGION_STATIC_ID#">
#TOP_PAGINATION#
<tr><td>
<table cellpadding="0" border="0" cellspacing="0" summary="" class="t14Standard">

jQuery selector is table with id report_#REGION_STATIC_ID#

Here is a description how it works. Place plugin to workspace static files. Include page HTML header or page template header:

<script src="#WORKSPACE_IMAGES#jquery.htmldbHscroll-0.0.1.min.js" type="text/javascript"></script>

Create classic report e.g. from query:

SELECT e.EMPNO,
  e.ENAME,
  e.JOB,
  e.MGR,
  m.ENAME AS MNAME,
  e.HIREDATE,
  e.SAL,
  e.COMM,
  e.DEPTNO,
  d.DNAME,
  d.LOC
FROM emp e,
  dept d,
  emp m
WHERE e.deptno = d.deptno
  AND e.mgr = m.empno(+)

Set static id for report region e.g. EMP_REP

Create dynamic Action. Select Advanced

$("#report_EMP_REP").htmldbHscroll({width:400,columns:2});
  • Event: After Refresh
  • Selection Type: Region
  • Region: {select your report region}
  • Condition: No Condition
  • Action: Execute JavaScript code
  • Fire On Page Load: True
  • Code:
  • Selection Type: None

You can check the working sample on apex.oracle.com.

Comments

  • Jari Laine 27 May 2021

    Hi Teenz,

    Unfortunately I don't have example of that. But it should be possible using JavaScript. See e.g. this JSFidle.

    Regards,
    Jari

  • Teenz 27 May 2021

    Can we change the position of horizontal scroll bar in classic report to the top of report. When there are many rows in the rport, its difficult for users to scroll down first and then find the horizontal scroll bar. I see work arounds available for IR and IG but none working so far for classic report with faceted search.
    ANy help would be really great.

  • Jari Laine 13 Oct 2018

    Hi Sucharita,

    Never try that. I assume it is posible if you accept that all IR build in features not working correctly.

  • Sucharita 11 Oct 2018

    Can we do this for interactive report also? I am having a similar requirement for interactive report.

  • Jari Laine 17 Nov 2016

    Hi Alice,

    Universal Theme report template is different that this example JavaScript expects.
    What I did look there is no very quick fix to get this working on Universal Theme.

    I try look this later but can't make any promises.

    Regards,
    Jari

  • Alice 16 Nov 2016

    Hello Jari,

    Thanks for reply. My application ID is 97683 and the page I wanted to have fix column is at page 1. What I wanted is to make the first three columns 'Release Criteria', 'Metric', and 'By' to be fixed on the page. I actually have post my question at https://community.oracle.com/thread/3990153. the oracle discussion forum. My classic report is actually a classic report based on function and wanted it still be the template /theme I am using Universal Theme - 42. I have added your javascript function to Function and Global Variable Declaration at the page 1 and also added dynamic action. As the theme didn't update, the fixed column feature didn't show. Could you please guide me how to update the theme/template in my current theme, since I did wanted it just standard template of default apex.

  • Jari Laine 16 Nov 2016

    Hi Alice,

    What is application id where you have try do this?
    What you have already try do? Do you get some JavaScript error or is there other problem?

    Regards,
    Jari

  • Alice 14 Nov 2016

    Hello Jari,

    I have reproduced my example at apex.oracle.com

    There access information is :

    Workspace: ALICE_DEMO

    Username: alice_guest

    Password: 54321

    When user is viewing the page at a smaller screen, I would like the first three columns 'Release Criteria', 'Metric', 'By' can be fixed in the screen.

    Could you please help me to take a look and give me some hint how to implement this?

    Thanks,

    Alice

  • Jari Laine 13 Jan 2015

    Hi Maicon,

    How it "not work" ?
    Please create example to apex.oracle.com and share developer login to workspace.

    Regards,
    Jari

  • Maicon 13 Jan 2015

    it does not work on template:13 Standart , do you have any idea for what it could be?