This discussion is archived
4 Replies Latest reply: Dec 10, 2010 1:20 AM by fac586 RSS

Interactive Report Control Break disregards HTML Header style.

794721 Newbie
Currently Being Moderated
This thread is a follow-up to {thread:id=2139884}.

Adding a Control Break to an Interactive Report causes the following style in my HTML Header to be disregarded:

<pre class="jive-pre">
<style type="text/css">
.apexir_WORKSHEET_DATA {
}
th#T_DESCRIPTION {
width: 300px;
max-width: 300px;
}
td[headers="T_DESCRIPTION"] {
max-width: 300px;
word-wrap: break-word;
}
th#T_NAME {
width: 80px;
max-width: 80px;
}
td[headers="T_NAME"] {
max-width: 80px;
word-wrap: break-word;
}
</style>
<!--[if lt IE 8]>
<style type="text/css">
/* IE is broken */
td.t-description {
width: 300px;
word-wrap: break-word;
}
</style>
<![endif]-->

</pre>

How can I get the Control Break to use the style defined in my HTML Header?
  • 1. Re: Interactive Report Control Break disregards HTML Header style.
    fac586 Guru
    Currently Being Moderated
    The control break changes the column headings, so all the stuff that depends on the <tt>td[headers="T_DESCRIPTION"]</tt> selector stops working. Didn't realise that manipulating the IR would cause such significant change to the underlying mark-up.

    It might be an idea to start questioning some of the assumptions here, to see if there are other ways to meet requirements.

    What is the nature of this data? It's unusual that it doesn't contain whitespace but is long enough that it has to wrap within a fixed column width.

    Is an IR necessary?
  • 2. Re: Interactive Report Control Break disregards HTML Header style.
    794721 Newbie
    Currently Being Moderated
    Good questions.

    <pre class="jive-quote">
    Is an IR necessary?
    </pre>

    I would like to take advantage of the robust quick and easy features that are offered by interactive reports ... especially implementing named reports. An IR is not necessary, but it sure would be handy if I could get the fixed-width working for my named reports (that include control breaks) too!

    <pre class="jive-quote">
    What is the nature of this data? It's unusual that it doesn't contain whitespace
    but is long enough that it has to wrap within a fixed column width.
    </pre>

    I have several columns that contain unbroken very long file/directory/URL paths and would like to have more control over the presentation without having to parse the data within each of the columns.
  • 3. Re: Interactive Report Control Break disregards HTML Header style.
    794721 Newbie
    Currently Being Moderated
    <pre class="jive-quote">
    The control break changes the column headings, so all the stuff that depends on
    the td[headers="T_DESCRIPTION"] selector stops working.
    </pre>

    I figured out how to make Interactive Report columns included under a control break, fixed-width.

    Thanks to fac586's insight, I used Firebug to easily see that applying a Control Break to an Interactive Report changes the "td[headers=" as follows:

    *"{space}BREAK_{control break column 1}_1"* is appended to "td[headers=" if only one control break column is implemented, e.g., if the interactive report had a control break on the "REGION_ID" column, then "td[headers=" for the T_DESCRIPTION column would change from td[headers="T_DESCRIPTION"] to td[headers="T_DESCRIPTION BREAK_REGION_ID_1"].

    I then added td[headers="T_DESCRIPTION BREAK_REGION_ID_1"] to the HTML Header code:

    <pre class="jive-pre">
    <style type="text/css">
    .apexir_WORKSHEET_DATA {
    }
    th#T_DESCRIPTION {
    width: 300px;
    max-width: 300px;
    }
    td[headers="T_DESCRIPTION"] {
    max-width: 300px;
    word-wrap: break-word;
    }
    <font color="green">
    td[headers="T_DESCRIPTION BREAK_REGION_ID_1"] {
    max-width: 300px;
    word-wrap: break-word;
    }
    </font>
    th#T_NAME {
    width: 80px;
    max-width: 80px;
    }
    td[headers="T_NAME"] {
    max-width: 80px;
    word-wrap: break-word;
    }
    </style>
    <!--[if lt IE 8]>
    <style type="text/css">
    /* IE is broken */
    td.t-description {
    width: 300px;
    word-wrap: break-word;
    }
    td.t-name {
    width: 80px;
    word-wrap: break-word;
    }
    </style>
    <![endif]-->
    </pre><br />

    I also added the Dynamic Action True Action to Add Class "t-description" for the "td[headers="T_DESCRIPTION BREAK_REGION_ID_1"]" JQuery Selector to make sure it works in IE < 8.


    Here's the syntax for "td[headers" using control breaks with 1 column, 2 columns and 3 columns:
    <pre class="jive-pre">
    One Control Break Column: *td[headers={column}{space}BREAK_{control break column 1}_1*

    Example: Control Break on REGION_ID ... <font color="green">td[headers="T_DESCRIPTION BREAK_REGION_ID_1"]</font>

    Two Control Break Columns: *td[headers={column}{space}BREAK_{control break column 1}_{control break column 2}_2*

    Example: Control Break on REGION_ID, HOST ... <font color="green">td[headers="T_DESCRIPTION BREAK_REGION_ID_HOST_2"]</font>

    Three Control Break Columns: *td[headers={column}{space}BREAK_{control break column 1}_{control break column 2}_{control break column 3}_3*

    Example: Control Break on REGION_ID, HOST, PATH, ... <font color="green">td[headers="T_DESCRIPTION BREAK_REGION_ID_HOST_PATH_3"]</font>
    </pre>
  • 4. Re: Interactive Report Control Break disregards HTML Header style.
    fac586 Guru
    Currently Being Moderated
    >
    "{space}BREAK_{control break column 1}_1" is appended to "td[headers=" if only one control break column is implemented, e.g., if the interactive report had a control break on the "REGION_ID" column, then "td[headers=" for the T_DESCRIPTION column would change from td[headers="T_DESCRIPTION"] to td[headers="T_DESCRIPTION BREAK_REGION_ID_1"].

    I then added td[headers="T_DESCRIPTION BREAK_REGION_ID_1"] to the HTML Header code
    {quote}

    What worried me about taking this approach was that it might turn into a never-ending task with every manipulation of the IR generating changed mark-up that had to be accommodated in the CSS selectors. It'll be OK if the options in the IR Actions Menu are restricted so that only a fixed set of known transformations can occur.

Legend

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