This discussion is archived
8 Replies Latest reply: Apr 6, 2013 3:13 PM by Mini RSS

Interactive Report Sub-total and total

Mini Journeyer
Currently Being Moderated
Hi friends,

I have an employee interactive report with group by job name and also showing the salary sub-total for each and every job(group by).

I have an requirement like to highlight the sub-total for each and every job with a background color so that the user can identify the sub-total with the color, and also whether it is possible to display an overall total @ last in the report with a label named "Total Salary" in which it calculates the overall salary is also to be highlightened with the background color.

Also is it possible to display a text "Sub-total" besides each and every salary sub-total  of job(group by). Currently if we display a sum for the salary then im getting the total's but with out a text named total.

Since i can see the highlighted feature in interactive report but im not sure how to apply it for the sub-total and total column.

I have reproduced the example in apex.oracle.com

http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::

In the application 9494 named "test" in page1.

Thanks in advance.

Brgds,
Mini
  • 1. Re: Interactive Report Sub-total and total
    Bas de Klerk Pro
    Currently Being Moderated
    Hi,

    don't think it's possible using the highlight feature but you should be able to overrule the css class apexir_AGGREGATE_VALUE for this specific report page, that's probably the easiest solution.

    regards
    Bas
  • 2. Re: Interactive Report Sub-total and total
    Mini Journeyer
    Currently Being Moderated
    Hi Bas,

    Thanks for the reply.

    Can you guide me of doing the same.

    Brgds,
    Mini
  • 3. Re: Interactive Report Sub-total and total
    Nattu Explorer
    Currently Being Moderated
    Hi,

    Add the below in the page html header

    <style>

    #apexir_WORKSHEET .apexir_AGGREGATE_VALUE {
    background: none repeat scroll 0% 0% red;
    }
    </style>

    (Change the colour as you want in the place of red. Also I tried to change in your demo app, its just spinning the wheels).

    Regards,

    Natarajan
  • 4. Re: Interactive Report Sub-total and total
    Mini Journeyer
    Currently Being Moderated
    Hi Natarajan,

    Thanks it does change the bg color of the sub-total, whether it is possible to keep a label "total" infront of it.

    Also i have included a total consolidated salary for all the job in a separate region under the report and i tried to changed the background color of it by giving the following in the region attribute of that region like
    style=background-color:red;
    But that Total region color dint change.

    Brgds,
    Mini
  • 5. Re: Interactive Report Sub-total and total
    Nattu Explorer
    Currently Being Moderated
    Hi, Mini,
    style=background-color:red;
    
    But that Total region color dint change.
    The code for style should be in "Form HTML Element Attributes". However, this changes the background color only for the Total value not for the whole row.

    If you want to change for the whole row, you need to change the template that is selected for the region.

    I changed the region template in your application to "Borderless Region" and made the changes to the "Borderless Region" template, it now shows the background color for Total Value.
    <table class="t20Region t20Borderless #REGION_CSS_CLASSES#" id="#REGION_STATIC_ID#" border="0" cellpadding="0" cellspacing="0" summary="" #REGION_ATTRIBUTES#>
    <thead><tr><th class="t20RegionHeader" id="#REGION_STATIC_ID#_header">#TITLE#</th></tr></thead>
    <tbody id="#REGION_STATIC_ID#_body">
    <tr><td class="t20ButtonHolder">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>
    </tbody>
    </table>
    The below does the trick. :)
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>
    Note: I made the changes to "Borderless Template", but you can copy the template to your own and apply this change.

    Regards,

    Natarajan
  • 6. Re: Interactive Report Sub-total and total
    Mini Journeyer
    Currently Being Moderated
    Hi Natarajan,

    Thanks for the reply, thanks for the change in adding the bg color for the region in the template.

    Regarding about the "Sub-total" label whether is it possible to display the label for each and every sub-total in the report.

    Thanks in advance.

    Brgds,
    Mini
  • 7. Re: Interactive Report Sub-total and total
    Nattu Explorer
    Currently Being Moderated
    Hi,

    I do not say that getting labels for the subtotals is not possible, but very tedious. You have to find out class/tr of the sub total and you can add a prefix to the innerhtml. You can use jquery selector to find out that nth level <tr> for the report id attribute and add the lablel at run time. Generally Standard End users would not expect a label for the subtotals but not sure about the audience for your report. If you still need to have, try jquery option, good luck :).

    Regards,

    Natarajan
  • 8. Re: Interactive Report Sub-total and total
    Mini Journeyer
    Currently Being Moderated
    Thanks, will try the same

    Brgds,
    Mini

Legend

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