Single Article

APEX 4: Classic report horizontal scroll with fixed columns

Category APEX and jQuery

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.

Comment Button

Comments

  • 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?

        
  • Chandrashekar 22 Nov 2013  

    Sorry for wrong understading.

    I am using custom CSS in my pages, this is raising the issue.

    I am trying to fix this in my application CSS.

    Thanks

        
  • Chandrashekar 22 Nov 2013  

    Hi Jari,

    Thanks for your quick and kind response.

    This is working only for one level tabs - right side bar page template only

    But, i am having two level tabs -right sidebar in all my pages.

    What change will fix the problem ?

        
  • Jari Laine 21 Nov 2013  

    Hi Chandrashekar,

    For horizontal/vertical scrolling report you need create custom report template.

    See my sample application witch report template it use and create same kind template to your own application.

    Regards,
    Jari

        
  • Chandrashekar 21 Nov 2013  

    Hi Jari,

    I have downloaded scroll_report_apex411.sql and installed in to my workspace. your application working fine.

    I am trying to apply the same to my sample application, unfortunately i am unable to get exact result.

    Could you please look into that and help me on this.

    Workspace : Chandu_Jnet

    Username : Jari

    Password : jari

    Application Number : 43578 (Horz/Vert Scroll).

    Thanks

    Chandrashekar

        

Global Right Column

Search

Archives

Subscribe in a Reader