This discussion is archived
1 2 3 Previous Next 40 Replies Latest reply: Nov 3, 2011 9:40 PM by Tony F. Go to original post RSS
  • 30. Re: Freeze Pane in Oracle Apex3.2
    835027 Newbie
    Currently Being Moderated
    <script type="text/javascript">
    var w = new Array(200,200,0,200,200,200,0,200,200,200,200,200,200,200,200,200,200,0,0,0);
    </script>

    and
    <script type="text/javascript">
    setDivHeight(300);
    setDivWidth(900);
    setRowHeight(45);
    setWidths();
    splitTable(1);
    </script>

    I have already increased the number of columns in an Array.

    Thanks,
    Dhana
  • 31. Re: Freeze Pane in Oracle Apex3.2
    ATD Guru
    Currently Being Moderated
    OK

    The error:
    >
    rows.0 is not null or not an object
    >
    should that be:
    rows[0] is null or not an object
    If that is the case, as "rows" is used in multiple cases in the code, you would need to identify which line generates the error. At the top of the splitTable function, add an alert:
    function splitTable(fixedColumns)
    {
     alert("Here 1");
    Then add similar lines (but with increasing numbers) into other locations within the splitTable function. When you have done that, run the page and see how far the code gets before you get no more messages. Then check the code immediately after the last message.
  • 32. Re: Freeze Pane in Oracle Apex3.2
    835027 Newbie
    Currently Being Moderated
    Hi,

    Actually in the setWidths function,the alert is not showing in the for loop.

    And at the time, while in the splittable funciton call, alert will be dropped when executing
    var tBRRow1Clone = tBR.rows[0].cloneNode(true);


    Thanks,
    dhanalakshmi.
  • 33. Re: Freeze Pane in Oracle Apex3.2
    ATD Guru
    Currently Being Moderated
    OK

    That line of code relies on:
    function setWidths()
    {
      var tBR = br.getElementsByTagName("TABLE")[0];
      ...
    }
    which, in turn, relies on:
    var br = document.getElementById("BR");
    which is above it in the &lt;script&gt; tag in the After Rows setting on the template.

    And that relies on this at the end of the Before Rows setting on the template:
    &lt;div id="BR" onscroll="javascript:scrollOthers();"&gt;
    &lt;table cellpadding="0" cellspacing="0" class="t18Standard" id="tableBR"&gt;
    All of these must be on the page for this bit to work.

    The DIV with the ID of "BR" is identified and stored in the javascript variable "br".

    The TABLE with the ID of "tableBR" is identified and stored in the variable "tBR"

    Make sure that you have copied the Before Rows and After Rows settings correctly
  • 34. Re: Freeze Pane in Oracle Apex3.2
    835027 Newbie
    Currently Being Moderated
    Hi ,

    Fyi,

    I have simply copied the code from my template and paste it here.

    Before Rows
    <style type="text/css">
    #tableBR {margin:0px; border:0px; padding:0px; table-layout:fixed; white-space:nowrap; width:100%}
    #tableTR {margin:0px; border:0px; padding:0px; table-layout:fixed; white-space:nowrap; width:100%}
    #tableBL {margin:0px; border:0px; padding:0px; table-layout:fixed;}
    #tableTL {margin:0px; border:0px; padding:0px; table-layout:fixed;}
    #tableBR div {margin:0px; border:0px; padding:0px;}
    #tableTR th {white-space:nowrap; text-align:left;}
    #tableTL th {white-space:nowrap; text-align:left;}
    #tableBR td {white-space:nowrap;}
    #tableBL td {white-space:nowrap;}
    #BR {overflow-x:scroll; overflow-y:scroll; padding:0px;}
    #TR {overflow-x:hidden; overflow-y:hidden; padding:0px;}
    #BL {overflow-y:hidden; padding:0px;}
    #TL {overflow-x:hidden; padding:0px;}
    </style>
    <table cellpadding="0" border="0" cellspacing="0" summary="">#TOP_PAGINATION#
    <tr><td>
    <table cellpadding="0" border="0" cellspacing="0" style="border:1px solid #D4D8D9; background-color:#EEEEEE">
    <tr>
    <td style="vertical-align:top"><div id="TL"></div></td>
    <td style="vertical-align:top"><div id="TR"></div></td>
    </tr>
    <tr>
    <td style="vertical-align:top"><div id="BL"></div></td>
    <td style="vertical-align:top"><div id="BR" onscroll="javascript:scrollOthers();">
    <table cellpadding="0" cellspacing="0" class="t2Standard" id="tableBR">
    <style type="text/css">
    #tableBR {margin:0px; border:0px; padding:0px; table-layout:fixed; white-space:nowrap; width:100%}
    #tableTR {margin:0px; border:0px; padding:0px; table-layout:fixed; white-space:nowrap; width:100%}
    #tableBL {margin:0px; border:0px; padding:0px; table-layout:fixed;}
    #tableTL {margin:0px; border:0px; padding:0px; table-layout:fixed;}
    #tableBR div {margin:0px; border:0px; padding:0px;}
    #tableTR th {white-space:nowrap; text-align:left;}
    #tableTL th {white-space:nowrap; text-align:left;}
    #tableBR td {white-space:nowrap;}
    #tableBL td {white-space:nowrap;}
    #BR {overflow-x:scroll; overflow-y:scroll; padding:0px;}
    #TR {overflow-x:hidden; overflow-y:hidden; padding:0px;}
    #BL {overflow-y:hidden; padding:0px;}
    #TL {overflow-x:hidden; padding:0px;}
    </style>
    <table cellpadding="0" border="0" cellspacing="0" summary="">#TOP_PAGINATION#
    <tr><td>
    <table cellpadding="0" border="0" cellspacing="0" style="border:1px solid #D4D8D9; background-color:#EEEEEE">
    <tr>
    <td style="vertical-align:top"><div id="TL"></div></td>
    <td style="vertical-align:top"><div id="TR"></div></td>
    </tr>
    <tr>
    <td style="vertical-align:top"><div id="BL"></div></td>
    <td style="vertical-align:top"><div id="BR" onscroll="javascript:scrollOthers();">
    <table cellpadding="0" cellspacing="0" class="t2Standard" id="tableBR">


    Column Heading Template
    <th class="t2Header"#ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>


    Before Each Row
    <tr #HIGHLIGHT_ROW#>


    Column template1
    <td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t2data">#COLUMN_VALUE#</td>

    After Each Row
    </tr>

    After Each Rows
    </table>
    </div></td>
    </tr>
    </table><div class="t2CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>
    <script type="text/javascript">
    var tl = document.getElementById("TL");
    var tr = document.getElementById("TR");
    var bl = document.getElementById("BL");
    var br = document.getElementById("BR");
    var rh = 25;
    function setRowHeight(h)
    {
    rh = h;
    }
    function setWidths()
    {
    var tBR = br.getElementsByTagName("TABLE")[0];
    var tot = 0;
    var brRows = tBR.rows;
    var c;
    var r;
    for (r = 0; r < brRows.length; r++)
    {
    brRows[r].style.height = rh;
    for (c = 0; c < brRows[r].cells.length; c++)
    {
    if (w[c] == 0)
    {
    brRows[r].cells[c].style.display = "none";
    }
    else
    {
    brRows[r].cells[c].style.width = w[c];
    }
    }
    }
    }
    function splitTable(fixedColumns)
    {
    var tBR = br.getElementsByTagName("TABLE")[0];
    var tBRRow1 = tBR.rows[0];
    var tBRRow1Clone = tBR.rows[0].cloneNode(true);
    var tTR = tBR.cloneNode(false);
    tTR.id = "tableTR";
    tr.appendChild(tTR);
    tTR.appendChild(tBRRow1Clone);
    tr.innerHTML += "";
    var tBRBody = tBR.tBodies[0];
    tBRBody.removeChild(tBRRow1);
    br.innerHTML += "";
    tTR = document.getElementById("tableTR");
    var tTL = tTR.cloneNode(false);
    tl.appendChild(tTL);
    tTL.id = "tableTL";
    var tTRRow1 = tTR.rows[0];
    var tTRRow1Clone = tTRRow1.cloneNode(false);
    tTL.appendChild(tTRRow1Clone);

    var fCol;
    var tTRRow1Cell1;
    var tTRRow1Cell1Clone;
    for (fCol = 0; fCol < fixedColumns; fCol++)
    {
    tTRRow1Cell1 = tTRRow1.cells[0];
    tTRRow1Cell1Clone = tTRRow1Cell1.cloneNode(true);
    tTRRow1Clone.appendChild(tTRRow1Cell1Clone);
    tTR.rows[0].deleteCell(0);
    }

    tTL = document.getElementById("tableTL");
    tl.innerHTML += "";
    tr.innerHTML += "";

    var tBLClone = tBR.cloneNode(false);
    bl.appendChild(tBLClone);
    tBLClone.id = "tableBL";
    tBL = document.getElementById("tableBL");
    tBR = document.getElementById("tableBR");
    var rows = tBR.rows;
    var r;
    var cClone;
    var rClone;
    var tBLRow;
    for (r = 0; r < rows.length; r++)
    {
    rClone = tBR.rows[r].cloneNode(false);
    rBLRow = tBL.appendChild(rClone);
    for (fCol = 0; fCol < fixedColumns; fCol++)
    {
    cClone = tBR.rows[r].cells[0].cloneNode(true);
    rBLRow.appendChild(cClone);
    tBR.rows[r].deleteCell(0);
    }
    }
    br.innerHTML += "";
    bl.innerHTML += "";
    var tlWidth = 0;
    for (fCol = 0; fCol < fixedColumns; fCol++)
    {
    tlWidth = tlWidth + w[fCol];
    }

    document.getElementById("tableTL").style.width = tlWidth + "px";
    document.getElementById("tableBL").style.width = tlWidth + "px";
    }
    function scrollOthers()
    {
    tr.scrollLeft = br.scrollLeft;
    bl.scrollTop = br.scrollTop;
    }
    function setDivHeight(h)
    {
    br.style.height = h;
    bl.style.height = h - 18;
    }
    function setDivWidth(w)
    {
    br.style.width = w;
    tr.style.width = w - 18;
    }
    </script>

    Next Page Template
    #PAGINATION_NEXT# >


    Previous Page Template
    <#PAGINATION_PREVIOUS#

    Next set Template
    #PAGINATION_NEXT_SET#>>


    Previous Set Template
    <<#PAGINATION_PREVIOUS_SET#

    And in report Header
    <script type="text/javascript">
    var w = new Array(200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200);
    </script>


    And in Report Footer
    <script type="text/javascript">
    setDivHeight(300);
    setDivWidth(900);
    setRowHeight(25);
    setWidths();
    splitTable(1);
    </script>


    Thats it...

    Thanks,
    Dhana

    Edited by: 832024 on Feb 24, 2011 3:58 AM
  • 35. Re: Freeze Pane in Oracle Apex3.2
    ATD Guru
    Currently Being Moderated
    The After Rows (which is what I think you mean!) setting does not start correctly. The first bits should be:
          &lt;/table&gt;
        &lt;/div&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;div class="t18CVS"&gt;#EXTERNAL_LINK##CSV_LINK#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;#PAGINATION#&lt;/table&gt;
    &lt;script type="text/javascript"&gt;
    var tl = document.getElementById("TL");
    var tr = document.getElementById("TR");
    var bl = document.getElementById("BL");
    var br = document.getElementById("BR");
    var rh = 25;
    Andy
  • 36. Re: Freeze Pane in Oracle Apex3.2
    821426 Newbie
    Currently Being Moderated
    Hi Andy,

    I am quite new to Oracle APEX. Any help would be great.
    When I create a Report Template in the Shared components of my application, I do not find it listed in the Report Templates when i navigate to the report regions of my application and so I am not able to choose the customized Template for my reports. I am customizing in order to get scrollable reports in my application, followed the steps provided in the Thread, http://kr.forums.oracle.com/forums/thread.jspa?threadID=2180543&start=0&tstart=0 .

    I am now listing the Steps in followed to create a Report Layout,
    Navigate to Shared components > Templates > Report

    Create From Scratch and paste the code as mentioned in the Thread.

    Apply changes and save it. But when i Navigate to a report in the Application I do not find this Listed. Would appreciate any help.

    Thanks,
    Ramya
  • 37. Re: Freeze Pane in Oracle Apex3.2
    863252 Newbie
    Currently Being Moderated
    hi Ramya,
    Did you find solution to this? I am facing the same problem.
  • 38. Re: Freeze Pane in Oracle Apex3.2
    user12957777 Newbie
    Currently Being Moderated
    It really is a nice solution. Please suggest how to freeze panes on second column of the SQL report ?

    Sanjay
  • 39. Re: Freeze Pane in Oracle Apex3.2
    Tony F. Explorer
    Currently Being Moderated
    Hi,

    I am attempting to follow this thread as this is exactly what I would like to do for one of my reports but unfortunately to no avail as I am also getting the following error:

    getting an error "rows.0 is not null or not an obejct".

    FYI, I am using Oracle ApeX 3.0.2 but I cannot seem to work out what this error is and why I am getting it.

    Can anyone pls assist?

    Thanks.
    Tony.
  • 40. Re: Freeze Pane in Oracle Apex3.2
    Tony F. Explorer
    Currently Being Moderated
    Hi,

    Would really appreciate some assistance with this as I'm really trying to get this report header freezing done in Oracle ApEx v3.0.2.

    Thanks.

    Tony.
1 2 3 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points