This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Nov 15, 2013 8:20 AM by TexasApexDeveloper RSS

Format IR Total And Text

Gus C Journeyer
Currently Being Moderated

Apex 4.2

 

I have an interactive report.

I use the sum attribute on the column and break formatting option to create a report total on one column

Report Sum Label      Total:

Break Columns          No Breaks

How to I format the total text and value in to red

 

Cheers

 

Gus

  • 1. Re: Format IR Total And Text
    vincent_deelen Pro
    Currently Being Moderated

    Hi Gus,

     

    The aggreagated field have a class "apexir_AGGREGATE_VALUE". You can use that class to add CSS, eg.:

    $(".apexir_AGGREGATE_VALUE").css("color","red")


    REgards,

    Vincent

  • 2. Re: Format IR Total And Text
    Gus C Journeyer
    Currently Being Moderated

    Thanks for that.

    Is there a way to do it with standard reports aswell

     

    Gus

  • 3. Re: Format IR Total And Text
    fac586 Guru
    Currently Being Moderated

    GusC wrote:

     

    Thanks for that.

    Is there a way to do it with standard reports aswell

     

    Theme? Report template? Browser version?

  • 4. Re: Format IR Total And Text
    Gus C Journeyer
    Currently Being Moderated

    Theme 21

    Standard Report Template

    Firefox

     

    Cheers

     

    Gus

  • 5. Re: Format IR Total And Text
    vincent_deelen Pro
    Currently Being Moderated

    Hi,

    That would depend on the way you get/display your "Total" value in the standard report. For the interactive report you can use the filter options from the action menu, which isn't available for the standard report. If you use the sum attribute of the report columns in a standard report, you end up with just an extra row at the end of your table. You could apply the CSS simply to the last table row of your report. You would have to ensure that the last row is indeed the totals row, incase you use pagination.

    The first column of the totals row contains the text "report total:".  So I guess you could write a function that checks if the first td of the last tr of the table has the text "report total:" and i f so add css to the table cells of that row.

     

    Regards,

    Vincent

  • 6. Re: Format IR Total And Text
    Pars Pro
    Currently Being Moderated

    put following in classic report region header/footer

     

    <style type="text/css">

    TD B {font-size:14px; font-weight:bold;

    color:red; font-family:Verdana}

    </style>

    you will get red color for sum text and value.

     

    Pars.

  • 7. Re: Format IR Total And Text
    fac586 Guru
    Currently Being Moderated

    Use the following Break Formatting options in the Report Attributes:

     

    • When displaying a break row, display this text before break columns
      <tr class="totals">

    • When displaying a break row, display this text after all columns
      </tr>

     

    And the following CSS in the page Inline CSS property (or the page template if required on multiple pages):

     

    .report-standard .totals td.data {
      color: red;
    }
  • 8. Re: Format IR Total And Text
    Gus C Journeyer
    Currently Being Moderated

    Thank you all for your help

     

    Gus

  • 9. Re: Format IR Total And Text
    TexasApexDeveloper Guru
    Currently Being Moderated

    Vincent,

    How can I use this to actually add text to the Totals line built in an Interactive Report?

     

    Thank you,

     

    Tony Miller

    LuvMuffin Software

  • 10. Re: Format IR Total And Text
    vincent_deelen Pro
    Currently Being Moderated

    Hi Tony,

     

    When I add a sum to an interactive report (on EMP), I get the following result as HTML for the totals row:

     

    <tr>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="right" headers="EMPNO"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="left" headers="ENAME"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="left" headers="JOB"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="right" headers="MGR"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="left" headers="HIREDATE"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="right" headers="SAL"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="right" headers="COMM">5763<br></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="right" headers="DEPTNO"></td>

      <td class="apexir_AGGREGATE_VALUE" style="white-space:nowrap;" align="left" headers="DNAME"></td>

    </tr>

     

    As you can see each table cell has the class "apexir_AGGREGATE_VALUE". You can use this class, along with the column header to manipulate the table cells. If I were to add text in hte first td of the totals row, using jQuery, the code would be:

         var myText = "Lorem ipsum..."

         $('.apexir_AGGREGATE_VALUE').closest('tr').find('td[headers="EMPNO"]').text(myTExt).addClass("myClass")

    Adding a class to the table cell will help you to further manipulate the table cell to add CSS etc.

     

    Note that for this example I use theme #25, the name of the class of the aggregated row might differ between themes.

     

    Regards,

    Vincent

  • 11. Re: Format IR Total And Text
    TexasApexDeveloper Guru
    Currently Being Moderated

    Understood.. Having to shelve the idea of doing this report in Interactive report, due to fact the way it displays break columns.. Also issue of using amounts calculated in aggregate sums to compute % values..

     

    Users would prefer they display like in standard report...

    Now looking at using analytic function in standard report to display the breaks properly..

     

    Thank you,

     

    Tony Miller

    LuvMuffin Software

  • 12. Re: Format IR Total And Text
    fac586 Guru
    Currently Being Moderated

    TexasApexDeveloper wrote:

     

    Now looking at using analytic function in standard report to display the breaks properly..

    Hi Tony

     

    Sounds like my idea of fun!

  • 13. Re: Format IR Total And Text
    TexasApexDeveloper Guru
    Currently Being Moderated

    Not really, the rolloups and such are becoming a major pain....

     

    Are you interested in a challenge??

     

    I will send along the code and would love your input!!

     

    Thank you,

     

    Tony Miller

    LuvMuffin Software

  • 14. Re: Format IR Total And Text
    fac586 Guru
    Currently Being Moderated

    TexasApexDeveloper wrote:

     

    Not really, the rolloups and such are becoming a major pain....

     

    Are you interested in a challenge??

    Go for it.

    I will send along the code and would love your input!!

    An example on apex.oracle.com would be the best option.

1 2 Previous Next

Legend

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