Summaries , summary columns

(4 posts) (2 voices)

Tags:

No tags yet.

  1. tokmoh, Member

    hi mydbr team, 1st thanks and congratulation developing such a wonderful system for reporting.

    i wanna ask if we can put the summary in between of row,

    let say i have a report that show my entire month of sales, the first column is day, the second column is date, i would like to put the summary base on weekly, so every 7 row, the summary will appears. need advice. tq~

  2. myDBR Team, Key Master

    Glad you like myDBR.

    To have the summary appear after each week, add a week column to query (so myDBR knows which rows are calculated as one) and add a header level to the week column. You can hide the column from report output if do not want to show it.

    See examples of this in the documentation.

    --
    myDBR Team

  3. tokmoh, Member

    thanks for the reply

    already use your suggestion and it works. But now is :

    The last column(column 5)are summation of column 3 and 4 using **select 'dbr.calc'** option as i cannot do normal summation because of the 'empty' data. when implement the **select 'dbr.sum', 'column 5'** it will show incorrect result. any idea ?

    as for examples :

    select 'dbr.calc','column 5','[column 4]+[column 3]'
    select 'dbr.sum','column 5'
    select

    (select ..1 )as 'column 3',
    (select ..2 )as 'column 4',
    (select((select ..1 )+(select ..2 )) as 'column 5'
    from ...

    column 3 column 4 column 5
    1 2 3
    - 4 4
    2 5 7
    2 6 8
    4 8 12
    --------------------------------
    9 25 30

    Suppose summary for column 5 will return 34

    tq again~

  4. myDBR Team, Key Master

    You can use ifnull (in MySQL) or isnull (other databases) to handle the NULL value.

    If you have a miscalculation in the report do following:

    - Make sure you have the latest build by running the updater
    - Call the report code from SQL Editor by adding "mydbr_gensql"-command in front of it and excute both calls:

    mydbr_gensql
    $$
    call sp_DBR_myreport( 12, 22);
    $$

    The mydbr_gensql converts the report output to SQL statements. Send the output to support so we can take a look at it.

    --
    myDBR Team


Reply

You must log in to post.