the substitution of the format of the value on the column of the sum

I have a report from the region, when I summarized a column total is posted with a specific format of theme.
For me, it will come out as "BOLD" / black and a font size. Is it possible to replace? and how?

Thank you.

Hello

>
BTW, im still using v2.0
>

That explained a lot. Some of these options overrides string for report models did not exist in older versions of the Apex, so you wouldn't have a region ID to identify the report area.

But we can do it manually.

On the report definition, in the header of the region, Supplement:

<div id="MyReport">

and in the foot of the region, Supplement:

</div>
<script type="text/javascript">
var outertable = document.getElementById("MyReport");
var innertable = outertable.getElementsByTagName("TABLE")[1];
var rs = innertable.rows;
var lastrow = rs[rs.length-1];
if (lastrow.cells[0].firstChild.firstChild.nodeValue == 'TOTAL')
{
 rs[rs.length - 1].style.backgroundColor = "red";
 rs[rs.length - 1].style.color = "yellow";
}
</script>

This allows us to put a div around the area and then get the second table in this (considering the fact that a report is a table in a table) - subsequently, the javascript code is the same.

Andy

Tags: Database

Similar Questions

  • Count the boxes, color Format according to value

    Searched for how to count the boxes in a PDF form. Found this link and have renamed my boxes so that they share the same initial letters.  Added the script below in the section of a body of numbers custom calculation script.  Nothing happens not even.  What should I know to set up correctly?  Also, I need to add a table more so it adds another section to the meter.  These boxes begin with cbxSAP.  Once the number of box is working, is there a way to tell if the sum is = or greater than 14 to the green color of the border/field and the default value would be red?  Hope that makes sense, thank you.

    // Custom calculate script
    
    (function () {
    
    
    
        // Get an array of the PO checkbox fields
    
        var fa = getField("cbxPO").getArray();
    
    
    
        // Initialize counter
    
        var sum = 0;
    
    
    
        // Loop through the fields and update counter
    
        for (var i = 0; i < fa.length; i += 1) {
    
            sum += fa[i].value !== "Off" ? 1 : 0;
    
        }
    
    
    
        // Set this field's value to the sum
    
        event.value = sum;
    
    
    
    })();
    

    You have get an error and it's why the JavaScript console opens and displays the lines of information.

    The first line indicates there is an eorror.

    The code is a custom calculation script.

    The code cannot locate the Group of fields named "cbxPO". Verify that the field whose name "cbxPO. ' # ' exist. The ' # ' is the name or number of subfield.

    The code actually works if there are no errors.

    For hierarchical fields, there must be "." separates levels. You field names must be:

    cbxPO.Dest

    cbxPO.Tax

    cbxPO.Pay

    cbxPO.Status

    cbxPO.Freight

    And it is not important what was once the value of exports.

  • Returns the sum of the values of certain months

    Hello

    I have a table that I keep a record of my overtime. See below.

    I want to do another table of the month (Jan, Feb, Mar etc.) and next to it the sum of all overtime worked each month.

    My salary is developed from the 4th of each month to the 4th on the other, I am able to add up the values of the different months and specify between the 4th one on the 4th of another?

    Thanks in advance.

    One way to do would be to use SUMIFS.

    The formula in B2, filled to the bottom:

    = SUMIFS(Table 1::$E,Table 1::$A,">"&C2,Table 1::$A,"<"&D2)

    The formula in C2, filled to the bottom:

    = A2 + 4

    The formula in D2, filled to the bottom:

    = EOMONTH(A2,0) + 5

    Column A contains strings of date and time in the format to display the month only.

    SG

  • Calculate the sum of the duration stored in format HH24

    Dear professionals,

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production. I stored length of certain events in the table TIME_DURATION as as follows (format h24:mi):

    CREATE TABLE "TIME_DURATION" ("ID" NUMBER(11,0), "HOURSMINUTES" VARCHAR2(5));
    
    Insert into TIME_DURATION (ID,HOURSMINUTES) values ('5','00:55');
    Insert into TIME_DURATION (ID,HOURSMINUTES) values ('7','00:18');
    Insert into TIME_DURATION (ID,HOURSMINUTES) values ('9','06:34');
    Insert into TIME_DURATION (ID,HOURSMINUTES) values ('15','00:12');
    Insert into TIME_DURATION (ID,HOURSMINUTES) values ('17','09:50');
    INSERT INTO TIME_DURATION (ID,HOURSMINUTES) VALUES ('41','12:39');
    

    select * from time_duration;
    
            ID HOURS
    ---------- -----
             5 00:55
             7 00:18
             9 06:34
            15 00:12
            17 09:50
            41 12:39
    
    6 rows selected.
    

    Now, I want to calculate the total time for all events (sum of all specific times). In this case, it should be 30 hours and 38 minutes.

    Any help would be much appreciated.

    Thanks in advance.

    Hello

    So, you want to add a number of lines varibale.  This sounds like a job for the SUM function.  AMOUNT of work on numbers, no channels such as time, so use TO_NUMBER to convert strings to numbers, so you can add them.  If you want to display the result as a string, you can use TO_CHAR to convert the sum into a string.

    WITH got_total_minutes AS

    (

    SELECT SUM ((TO_NUMBER (SUBSTR (heure, 1, 2) * 60)))

    + TO_NUMBER (SUBSTR (hour 4))

    ) AS total_minutes

    OF time_duration

    )

    SELECT TRUNC (total_minutes / 60). ':'

    || To_char (MOD (total_minutes, 60))

    , "FM00.

    ) AS total_hours_minutes

    OF got_total_minutes

    ;

    The output is not quite what you asked:

    TOTAL_HOURS_MINUTES

    --------------------

    30: 28

    If you really want 30:38', explain how to get it.

    This solution assumes that time always is always 5 characters (2 digits, a separator and another of 2 digits) as it is in your sample data.

    If your actual data aren't like your sample data, the same approach still works, but the SUBSTR expressions will be more complicated.

    adnanBIH wrote:

    Dear professionals,

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production. I stored length of certain events in the table TIME_DURATION as as follows (format h24:mi):

    1. CREATE TABLE 'TIME_DURATION' ('ID' NUMBER (11.0), VARCHAR2 (5)) 'HOUR '.
    2. Insert into TIME_DURATION (ID, TIME) values ('5',' 00:55 ');
    3. Insert into TIME_DURATION (ID, TIME) values ('7',' 00:18 ');
    4. ...

    Thanks for posting the CREATE TABLE and INSERT.

    ID is a NUMBER, so do not use quotes around it:

    Insert into TIME_DURATION (ID, TIME) values (5, ' 00:55 ');

    Insert into TIME_DURATION (ID, TIME) values (7, ' 00:18 ');

    ...

    Depending on how you plan to use the hour, you may want to store a NUMBER, also, or maybe an INTERVAL DAY TO SECOND.

  • Adobe Acrobat Standard DC - calculate, the value is the "sum" of

    The "text field properties / calculate / value is the 'sum' of the following fields / pinch / field selection"window does not provide any options to select. "  I formatted all the fields in the source & field sum as 'number' and out spaces in domain names.  My version of Acrobat Standard DC excludes a Sum function?  Thank you, all!

    It displayed fine. It looks good, so I don't know why there is no fields displayed when you click the button to 'Pick '. I always use the JavaScript option, but you can try the option of simplified field notation to work around the problem. You need to enter something like:

    Field1, Field2, field3 and field4

    Where are the names of the fields that you want to calculate the total, so change to match your domain names.

  • Hide the values in a column?

    Hi, I have this requirement to hide all values in a column and but not the Total of this column in the PivotTable.

    When I try to hide the values, he hides the Grand Total too... I need to show.
    Help, please.

    I use CSS Style - display: none for this particular column in PivotTable.

    Sigma sigin on PivotTable-> Format values-> text-decoration: none;
    For the column using the style css: color:rgb (242,245,249); or use display: none;

    Appreciate if you mark as correct

  • How to highlight the minimum value in a column?

    I need to highlight the lowest value in each column in my spreadsheet. I try to use the conditional nail, but I can't find a function to work as I need.

    One way would be to calculate the minutes in a cell of a footer row, select the cells in the body of the column and apply conditional highlighting like this:

    You must click on the chip address first, and then select the comparison cell, A8 here, then be sure to keep the row and column.

    The A8 from the example formula is = MIN (A).

    The result is a bold 2 (not shown in the screenshots).

    SG

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • How to calculate the sum of the values of some columns in a table

    Hello

    I want to get the column just the average of the values of some columns not all columns of the table.what I have to change exactly in this block diagram.even if the table size is 25 average, I want the division as the number of values in each column (= number of lines)

    just like that:


  • Through the sum of the values in all of the array of Boolean one and zeros

    Hello.

    I have an array of Boolean which I have converted one and zeros. I just want to the sum of all the elements in this table (in other words, giving the number of 1 in the table). I used the feature to add items, but I get a negative value. I checked there were not all values except one and zero (I know it shouldn't be) using max and min. I don't know how a negative value has been calculated - any ideas.

    Thanks in advance

    Before adding elements, convert the table I32 or I64. The output of the primitive add-on is of the same type that the entry and if the entry is an I16, then you cannot have a value greater than 32,767 or value will wrap around (what happened in your case.

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • SQL query to display the sum of the values of each June and December

    Hello having problems of construction of a query to the list SQL query to display the sum of the values of each June and December each year.

    My Table;

    TABLE name: MONTH_TERM

    Fields with values:

    TERM_KEYMONTH_ACTUALMONTH_DATE
    8250001/11/2015 0:00
    8245001/12/2015 0:00
    8240501/01/2016 0:00
    8240001/02/2016 0:00
    8245001/03/2016 0:00
    8242501/04/2016 0:00
    8243501/05/2016 0:00
    8241006/01/2016 0:00
    8240901/07/2016 0:00
    8241501/08/2016 0:00
    8242009/01/2016 0:00
    8242210/01/2016 0:00
    8243611/01/2016 0:00
    8255601/12/2016 0:00
    8256801/01/2017 0:00
    8262402/01/2017 0:00

    What I would like to see in a query result:

    TERM_KEYMONTH_ACTUALMONTH_DATETotal of 6 months
    8250001/11/2015 0:00
    8245001/12/2015 0:00950
    8240501/01/2016 0:00
    8240001/02/2016 0:00
    8245001/03/2016 0:00
    8242501/04/2016 0:00
    8243501/05/2016 0:00
    8241006/01/2016 0:002525
    8240901/07/2016 0:00
    8241501/08/2016 0:00
    8242009/01/2016 0:00
    8242210/01/2016 0:00
    8243611/01/2016 0:00
    8255601/12/2016 0:002658
    8256801/01/2017 0:00
    8262402/01/2017 0:00

    ---

    Here's my query:

    Select

    "TERM_KEY,"

    "MONTH_ACTUAL,"

    to_char(MONTH_DATE,'MM/YYYY') MONTH_DATE,

    DEAL to_char (MONTH_DATE, 'MM')

    WHEN '06' THEN (SELECT SUM (MONTH_ACTUAL)

    OF MONTH_TERM

    WHERE the to_char (MONTH_DATE, 'MM') between 1 and 6

    AND term_key = 82)

    WHEN '12' THEN (SELECT SUM (MONTH_ACTUAL)

    OF MONTH_TERM

    WHERE the to_char (MONTH_DATE, 'MM') between 7 and 12

    AND term_key = 82)

    ELSE null

    END as SIX_MO_CUMM,

    of MONTH_TERM

    where term_key = 82

    It's my results:

    TERM_KEYMONTH_ACTUALMONTH_DATETotal of 6 months
    8250001/11/15 0:00
    8245001/12/15 0:003608
    8240501/01/16 0:00
    8240001/02/16 0:00
    8245001/03/16 0:00
    8242501/04/16 0:00
    8243501/05/16 0:00
    8241001/06/16 0:003717
    8240901/07/16 0:00
    8241501/08/16 0:00
    8242001/09/16 0:00
    8242210/01/16 0:00
    8243601/11/16 0:00
    8255601/12/16 0:003608
    8256801/01/17 0:00
    8262401/02/17 0:00

    Any ideas on how to fix would be great

    Select term_key,

    month_actual,

    month_date,

    case mod (to_char (month_date, 'mm'), 6)

    When 0 then sum (month_actual)

    During)

    term_key partition

    order of month_date

    between the previous month '5' interval and the current line

    )

    end '6 MONTHS in TOTAL'

    from tbl

    order of term_key,

    month_date

    /

    TERM_KEY MONTH_ACTUAL MONTH_DAT 6 MONTHS TOTAL
    ---------- ------------ --------- --------------
    82 500 NOVEMBER 1ST, 15TH
    82 450 1 DECEMBER 15 950
    82 405 1 JANUARY 16
    82 400 1 FEBRUARY 16
    82 450 1ST MARCH 16
    82 425 1ST APRIL 16
    82 435 1 MAY 16
    82 410 2525 1 JUNE 16
    82 409 1 JULY 16
    82 415 1ST AUGUST 16
    82 420 16 - SEP - 01

    TERM_KEY MONTH_ACTUAL MONTH_DAT 6 MONTHS TOTAL
    ---------- ------------ --------- --------------
    82 422 1 OCTOBER 16
    82-436 NOVEMBER 1, 16
    82 556 2658 1 DECEMBER 16
    82 568 1 JANUARY 17
    82 624 1 FEBRUARY 17

    16 selected lines.

    SQL >

    SY.

  • Use the value of the sum and compare

    I have a table with data below

    T1

    ID, amount

    12,20

    13,10

    14.5

    create table T1 (ID number, amount);

    Insert into T1

    Select double 12.20;

    Union

    Select 13,10 double;

    Union

    Select double 14.5;

    I need the sum of the quantity and the value of the sum compares the values as flat > display then 10 0 otherwise amounted

    output

    ID, amount, derived

    12,20,20

    13,10,10

    14,5,5

    If my table has a

    T1

    12.0

    13.5

    It should be

    T1

    12,0,0

    13,5,0

    You can use the analytic function SUM

    select id, amount, case when sum(amount) over() > 10 then amount else 0 end derived from t1
    
  • Try to Textfield value in Master form as the sum of the text fields of form in detail.

    APEX version: 4.2.3

    Oracle: 11 GR 2

    Browser: Chrome

    Hello Experts,

    I am very close to my first project end in APEX and I would really appreciate help in this last hitch.

    I have a master detail form and I'm trying to update a text box in the Master shape with the SUM of the values in the detailed form. I have created a process with the PLSQL Code that fires before saving the record.

    because me in 1... apex_application.g_f11. Count

    loop

    : P35_TotalAmount: =: P35_TotalAmount + apex_application.g_f14 (i);

    End loop;

    This means that if there are 3 rows in a table (the detail section) with f14 textfields with a value of 100, 200 and 300. I want to see the number 600 in P35_TotalAmount text box. However, this is not case. The problem is the use of: P35_TotalAmount. If I try to set the value of: P35_Totalamount by adding the two text boxes in tabular presentation so if works very well! For example, code below works fine.

    because me in 1... apex_application.g_f11. Count

    loop

    : P35_TotalAmount: = apex_application.g_f13 (i) + apex_application.g_f14 (i);

    End loop;

    Can someone please point out that I am I missing? Is there a better way to do this?

    Hello

    don't know if you posted the complete code of your process, but if P35_TotalAmount is null then it will never work for null + 100 = null

    So it should work:

    : P35_TotalAmount: = 0;

    because me in 1... apex_application.g_f11. Count

    loop

    : P35_TotalAmount: =: P35_TotalAmount + apex_application.g_f14 (i);

    End loop;

    concerning

    Bottom

  • Calculate the sum of values of 2 where Clauses

    Hi, sorry to trouble, I have all the data in a database or anything like that, just to think about some of the work I have to do, trying to get ahead. I was wondering how i would be the sum of the values in a column, but with 2 where clauses. By example, if I wanted to the sum of all the values until 18:00 in 1 column and all the after 18:00 for 1 day how I would write this out.

    I don't know how to write separately, i.e.

    select name, sum(values) as after6
    from table
    where time > '18:00'
    group by name;
    

    select name, sum(values) as upto6
    from table
    where time < '18:00'
    group by name;
    

    How can I combine these columns after6 and upto6 next to each other.

    If someone could please advise.

    Thanks in advance

    Select the name,

    sum (case when time > 18:00 ' then 0 otherwise end of values) as after6,.

    sum (case when time< '18:00'="" then="" values="" else="" 0="" end)="" as="">

    table

    Group by name;

    ----

    Ramin Hashimzade

  • How to dynamically change the value of a column in a report

    Hi, I'm new to APEX and I have a small requirement. I have a report in a page which I query. Report will always have only one record. I need to change a value of a column in this report of the value received from another page. I was able to send the value of another page on my page of reports to a hidden page element, but I don't know how I can configure this value received to this column in the report. Is this possible? If Yes, can anyone help with this?

    970829 wrote:

    Please update your forum profile with a real handle instead of '970829 '.

    Hi, I'm new to APEX and I have a small requirement. I have a report in a page which I query. Report will always have only one record. I need to change a value of a column in this report of the value received from another page. I was able to send the value of another page on my page of reports to a hidden page element, but I don't know how I can configure this value received to this column in the report. Is this possible? If Yes, can anyone help with this?

    Not really clear exactly what it is you are trying to reach. You want to replace the value of a column in the report with the value of a page element? If so, simply replace the column in the report with a reference to the required page elementquery:

    select
       empno
    , ename
    , job
    , :p2_sal sal -- Replace value of sal column with value of P2_SAL item
    from
       emp
    

Maybe you are looking for