Sorting by summary column

How do I sort my report based on a summary column I have created?

hi,
there is no break order property for summary columns .
so use the group by and take the sorting order for whole group
example:
SELECT DEPTNO, JOB, ENAME, SAL FROM EMP
ORDER BY SAL
You then create two groups, G_DEPT and G_JOB. G_DEPT contains
the DEPTNO column and G_JOB contains the JOB column. If you
specify a Break Order of Descending for the DEPTNO column and
Ascending for the JOB column, your output would appear similar
to that below (assuming you use a Tabular style):
Deptno Job Ename Sal
30 CLERK JAMES 950.00
MANAGER BLAKE 2850.00
SALESMAN WARD 1250.00
MARTIN 1250.00
TURNER 1500.00
ALLEN 1600.00
20 ANALYST SCOTT 3000.00
FORD 3000.00
CLERK SMITH 800.00
ADAMS 1100.00
MANAGER JONES 2975.00
10 CLERK MILLER 1300.00
MANAGER CLARK 2450.00
PRESIDENT KING 5000.00

Similar Messages

  • Sorting by summary column, query based on previous query.

    Using 10g reports.
    I've got a report with one query currently thats broken down itno a couple groups. I'm trying to change the order they are displyed by based on a summary count of each group. I'm also trying to do another query for the report based on the results of the first one and display that with the information from the first.
    The report currently:
    Chain name
    ABC Stores
        Month
        JUN
         Store Name                   Store ID                bad sales
          Store1                         storeid1                   5
          Store2                         storeid2                   3
          Store3                         storeid3                   1
                                                         month total: 9
    JUL
          Store1                         storeid1                   6
          Store2                         storeid2                   5
          Store3                         storeid3                   2
                                                        month total:13
                                                        Chain total  22
    XYZ Stores
        JUN
          Store1                      storedid1                     20
          Store2                      storedid2                     15
                                                         month total  35
       JUL
          Store1                      storedid1                      11
          Store2                      storedid2                       7
                                                        month total     18
                                                         Chain total     53What I want to do is sort the order the store chains appear in based on the CHain total of bad sales. This is a summary done by the report and not in the sql query at the moment. I would also like to create a second query where it takes the store id and month from the first query and uses it to look up the total sales each store did so I can determine what percentage of the total sales the bad sales were. I would like to add this column plus a calculated percentage column to the right of the current columns but still have them grouped as they are. Is this possible to do or will i need to change my original query?
    Not very familiar with reports and I haven't been able to find anything to indicate how this should/could be done yet. Any help is appreciated.

    hi,
    there is no break order property for summary columns .
    so use the group by and take the sorting order for whole group
    example:
    SELECT DEPTNO, JOB, ENAME, SAL FROM EMP
    ORDER BY SAL
    You then create two groups, G_DEPT and G_JOB. G_DEPT contains
    the DEPTNO column and G_JOB contains the JOB column. If you
    specify a Break Order of Descending for the DEPTNO column and
    Ascending for the JOB column, your output would appear similar
    to that below (assuming you use a Tabular style):
    Deptno Job Ename Sal
    30 CLERK JAMES 950.00
    MANAGER BLAKE 2850.00
    SALESMAN WARD 1250.00
    MARTIN 1250.00
    TURNER 1500.00
    ALLEN 1600.00
    20 ANALYST SCOTT 3000.00
    FORD 3000.00
    CLERK SMITH 800.00
    ADAMS 1100.00
    MANAGER JONES 2975.00
    10 CLERK MILLER 1300.00
    MANAGER CLARK 2450.00
    PRESIDENT KING 5000.00

  • Use of summary columns?

    Typically, this sort of thing is easily achieved in Excel where you can calculate the values in an output column based on input values. I need to do this in Reports. I am using Reports 6i (Report Builder 6.0.8.27.0)
    I have a relatively simple query where I am outputting values (Counts) and then I need to display the summation on the next line. Let me explain using an example:
    ID     Start Date          End Date          Column 1     Column 2
    =============================================
    1     01-JAN-2010     30-JUN-2010          120                0              
    2     01-JUL-2010     31-DEC-2010          200               120
    3     01-JAN-2011     30-JUN-2011           115               320
    4     01-JUL-2011     31-DEC-2012          300               435
    5     01-JAN-2013     30-JUN-2013          100               735
    As you can see that Column 2 is derived by adding the previous values in Column 1 and outputting it on the next line.
    So, for ID = 4, Column 2 = 120 + 200 + 115 = 435 and ID = 5, Column 2 = 120 + 200 + 115 + 300 = 735.
    When I use summary columns, I don't get the desired result.
    I could technically create a Formula column and have a place holder column and re-query the results but I was hoping to avoid another SQL when the data has already been fetched. Any ideas or pointers would be greatly appreciated!
    Thanks

    hi,
    i think i can satisfy u
    download the rdf (6i)
    https://www.zeta-uploader.com/1236837069
    This URL is valid until Tuesday, June 25, 2013
    thanks
    mostafiz mitul

  • I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of

    I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of order. The last version sorted fine.

    Welcome to Apple Support Communities
    When you install the new iWork version, the old iWork version is kept, so it looks like you are opening your old version.
    To fix this, open a Finder window, choose Applications in the sidebar and drag the new Numbers version to the Dock, so you can access to it quickly. Open all documents from this version. I don't recommend you to delete the old Numbers version in case you need it.
    Respecting to the second question, you will get better answers in the Numbers for OS X forum

  • Summary Column inside the Cross Product

    Hai All,
    I have developed a matrix report in the RDF format. There is a summary column inside the cross product. When I create the generate XML from the RDF the summary column from cross product is not apppering in the generate XML file. How can we accomplish that summary column inside the RDF.
    Thanks in Advance

    http://winrichman.blogspot.com/search/label/BIP%20Vertical%20sum
    http://winrichman.blogspot.com/search/label/Cross-tab
    these links should help , you , if not, send me the xml and template and desired output.

  • I can't sort a single column only (ignoring the next column)

    I can't sort a single column only (ignoring the next column) in NUMBERS

    Numbers sorting follows a database model in which each row is a 'record' rather than a collection of unrelated data items. When a table is sorted, the integrity of the individual records (rows) is maintained.
    If you need to sort a single column, that column (or its data) must be separated from the rest of the table.
    That can be done using copy/paste (as described above by Wayne), or by taking the column to be sorted out of the table, dropping it on the sheet to form a new, single column table, doing the sort, then returning the column to the original table.
    The 3 1/2 step process takes longer to describe than to do.
    Regards,
    Barry

  • How to get summary columns in delimited text file

    How to get summary columns in delimited text file
    I am trying to generate a delimited text file output with delimited_hdr = no.The report is a Group above report with summary columns at the bottom.In the text file the headers are not getting repeated & thats ok.The problem is the summary data is getting repeated for each row of data.Is there a way where i will get all the data & summary data will get displayed only once.I have to import the delimited text file in excel spreadsheet.

    Sorry there were a typos :
    When I used desformat=DELIMITEDDATA with desttype=FILE, I get error "unknown printer driver DELIMITEDDATA". When you look for help, DELIMITED is not even listed as one of the values for DESTFORMAT. But if you scroll down and look for DELIMITER it says , this works only in conjuction with DESTFORMAT=DELIMITED !!!!!!??!! This is in 9i.
    Has this thing worked for anybody ? Can anyone please tell if they were able to suppress the sumary columns or the parent columns of a master-detail data for that matter ?

  • : HIDING SUMMARY COLUMNS IN MATRIX REPORT , URGENT

    Hi,
    Can any one please tell me how to hide a column in oralce matrix report. Its a summary column for the matrix report which appears next to the cell values. For example
    Manufacturer
    Brand
    SubBrand1 SubBrand2 Brand Total Manufacturer Total
    Week $ Sales $ Sales Total $ Sales Total $ Sales
    This is a case where,the cell value is the $ sales for the SubBrand for the week. And it gets total at each brand level and each Manufacturer level. The requrement is if there is only one SubBrand for a Brand then the Brand total should not appear on the report. Similarly if there is one Brand for a Manufacturer, then the total at Manufacturer level should not appear . The point is not only it should dissapear but the frame should srink to make it fell that there is no totaling going on at those two levels. If the fileds just remains blank then the report looks odd. So the gap should be srinked as well. How to do it . This is very urgent . Please help me out.
    Thanks
    Feroz

    use a formst trigeer on the field that returns false when you don't want to display the field.

  • Can I reference a Summary Column in my sql query?

    Basically the subject asks it all. I have a very complex report that has many data linked queries from the "main" query. One of these data linked queries has a sub-query within it that references the primary key of the main query. I can't data link (I can, but it's useless) using this field as it's a sub-query that needs the link, and that link specifically. I've tried to create a Summary Column that gives me the "First" (and only, so it's safe) in order to reference it in the SQL block, but no go. I'm thinking this isn't even possible? Anyone have any ideas? Right now I'm referencing it as I would in a PL/SQL block (:CS_PK), but it's just treated as a parameter that's never passed. Doesn't read the summary column. Hmmm... I'm stuck.

    Hi all... this report is still not completed. I've tried the summary column, and created a formula column that sets the user parameter to the primary key that's needed elsewhere. The report runs, no errors, but my best guess is that it's simply not reading that formula column. Here's my formula column:
    function CF_1FORMULA0024 return Number is
    begin
    if :tblassessmentinst is null then
    :tblassessmentinst := :CA_ASSESS_INST;
    elsif :tblassessmentinst is NOT null then
    :tblassessmentinst := :CA_ASSESS_INST; -- this WAS :tblassessmentinst but not working with prod ver, so delay
    else
    :tblassessmentinst :=0;
    end if;
    return(:tblassessmentinst);
    end;
    For testing, I display both the :tblassessmentinst on the report, as well as this formula column. The formula column always displays the correct number, but the :tblassessment only displays 1 (of many) records that need to be displayed. It's like it's not refreshing the formula column for each record? Again, still super stumped, so throw any ideas my way please.
    Thanks again,
    TL

  • Summary column with where clause

    Hi all,
    I'm using Oracle Report Builder 10GR2. I have the following issue: In one of the query i have the following result :
    Suppliers     0
    Suppliers     1408
    Total in  BGN     1408
    Customers      6024
    Customers      11779.32
    Customers      
    Total in  BGN     11779.32
    Taxes      0
    Taxes      0
    Total in  BGN     0
    Cash      1363.85
    Cash      691
    Cash      991.23
    Cash      688
    Total in  BGN     2355.08I want to make a sum for these columns where corresponds to description " Total in BGN" . Maybe it is a simple task... Do i have a chance to select from a query in a Report Builder?
    If yes, pls specify? Or maybe there is a chance to add a where clause for summary column. But keep in mind that this is one of the queries in the report builder and i have to add summary with this conditions. I cannot change the existing query but probably add a new one.
    Any ideas?
    DB Version: 11g
    Thanks in advance,
    Bahchevanov.
    Edited by: bahchevanov on Sep 29, 2012 2:21 AM

    Hello,
    You should use parameter file.Another question i can see you are using 11g.Why don't you use data pump?.
    Data Pump is faster and have more features and enhancement than regular imp and exp.
    You can do the following:
    sqlplus / as sysdba
    Create directory DPUMP_DIR3  for 'Type here your os path that you want to export to';then touch a file:
    touch par.txt
    In this file type the following the following :
    tables=schema.table_name
    dumpfile=yourdump.dmp
    DIRECTORY=DPUMP_DIR3
    logfile=Your_logfile.log
    QUERY =abs.texp:"where hiredate>'01-JAN-13' "then do the following
    expdp username/password parfile='par.txt'
    If you will import from Oracle 11g to version 10g then you have to addthe parameter "version=10" to the parameter file above
    BR
    Mohamed ELAzab
    http://mohamedelazab.blogspot.com/

  • How to disable sorting for some columns in a ALV GRID?

    Hi i have requirement where I have to disable sorting for some columns in a ALV GRID. i am using REUSE_ALV_GRID_DISPLAY function module.
    Can anybody help me. how to acieve this? Any code snippets will really be appreciated.

    Hi,
    I have tried this but not completely successful. I think this can be done using the OOPS method.
      DATA: it_event_exit TYPE  slis_t_event_exit.
      DATA: w_exit TYPE slis_event_exit.
      w_exit-ucomm = '&ODN'.
      w_exit-before = 'X'.
      CLEAR w_exit-after.
      APPEND w_exit TO it_event_exit.
      w_exit-ucomm = '&OUP'.
      w_exit-before = 'X'.
      CLEAR w_exit-after.
      APPEND w_exit TO it_event_exit.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program          = w_repid
          i_callback_top_of_page      = 'ALV_TOP_OF_PAGE'
          i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'
          i_callback_user_command     = 'USER_COMMAND'  <- User command form
          is_layout                   = wm_layout
          it_fieldcat                 = wt_fieldcat
          it_events                   = i_events
          it_event_exit               = it_event_exit    <- Need to fill
          it_sort                     = wt_sort
          i_default                   = 'X'
    Now you can capture this events in the user command
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      IF r_ucomm = '&OUP' and rs_selfield-SEL_TAB_FIELD = 'Your field name'.
      ENDIF.
    ENDFORM.                    "user_command
    In this form you will get the function code in 'r_ucomm' and the field selected for sorting in 'rs_selfield-SEL_TAB_FIELD'. But reseting 'r_ucomm' will not work.
    May be somebody else can give some help on this.
    But this will work if you follow the oop method.
    Please see this document for more info.
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
    Thanks
    Vinod

  • Placing Summary column in master data block

    I have a master/detail datablock form. i want to show the sum of "amount" field that is present in detail datablock and this summar field must be placed in master data block but it does not compile the form and shows following error.
    FRM-30377: Summary item must reside in single-record block or in same block as summarized item.
    Item: S
    Block: PBL_PAYMENT_MASTER
    FRM-30085: Unable to adjust form for output.
    it works only by putting it in the same detail block with "Query All Records" to YES.
    But I want to place this summary column in master data block but then it is not working.
    How we can solve this problem.

    Hi,
    In this case:
    -- i put my summary column in the master data block with :Query_All_RECORDS set to yes
    --but Physically it is placed on detailed block on the canvas
    and it Works with this trick.
    Regards,
    Abdetu.

  • Sorting by Multiple Columns in Numbers 3.0

    The new Numbers 3.0 update has moved some stuff around I need, and can not find. 
    Where is "Reorganize"?  The ability to sort multiple by columns.  (e.g. Sort Ascending Column A, THEN Column B, THEN Column C)
    mf

    this didn't work for me - i have item, then price, then checkbox. using the formula just gave an amalgamation of the three cells.
    Hi Saqib,
    The very idea of the workaround is to give an amalgamation, more often called "concatenation", and then just sort on the column containing the concatenated "string."
    As you've discovered, the =A&C&B formula only works if A,C, and B are all text. If you've got numbers in the mix then you have to pad them with leading zeros for them to sort as you want. That's easily done.
    Let's say C is a number and A and B are strings. You could put somethng like this in column D:
    =A&RIGHT("0000"&C,4)&B
    It's certainly not convenient to have to add a new column and put in a formula. But this is not *that* difficult as a workaround until the day multcolumn sort is added back in.
    SG

  • Can data be sorted by multiple columns in numbers version 3

    Since upgrading Numbers to version 3 (now 3.0.1) I have been unable to sort data in spreadsheets using multiple columns.  Anyone found a solution?
    Regards
    kurrajong60

    Here's a simple example. Say you want this sorted first by Region then by Name then by Amount.
    So if you set up a sort index column with a simple formula and all you have to do is this (two clicks):
    Giving you this:
    Of course you could do it as I think Hiroto is suggesting and manually sort first by column B, then sort by C, then sort by A.
    But that's a lot of trouble and it's easy to confuse the order so you end up having to start over again.
    SG

  • Change Labels on Summary Columns

    Could anyone advice me how to change labels on the summary columns on a cross tab report?
    Current it shows for e.g. count(orders).
    I would like to change it to "Order Count"
    Also how can i change the value format on a drill down report?

    Hi,
    Thanks a lot for your answers.
    First, on umResetPasswordPage.jsp I have found the code where "LAST_NAME" must take a value from other file (Could be from umelogonbase.jar?) so, maybe it is not the right place to change it, isn't it? or did you suggest by other way?? This is the code on the umResetPasswordPage.jsp file:
    <td width="161" height="20">
            <label class=urLblStd for="logonlastnamefield">
              <%=logonLocale.get("LAST_NAME")%>
              <span class=urLblReq> *</span>
            </label>
          </td>
    Second, On Portal Content there is not any Page/Iview wich manage this Support (LogonHelpApp) page openned by "get Support" link on Welcome Portal Page. At this time, I could not find if is it a webdynpro or other component Portal....

Maybe you are looking for

  • How do I stop Safari from Changing Visited Links Color's?

    I recently switched from Firefox to Safari since I find Safari much faster. I do have one annoyance though. When I click a link (especially in forums) and revisit a page with that link, Safari is changing the link's color. Firefox did this too, it ch

  • Request (PSA) was NOT posted successfully to data target (InfoCube)

    In our daily load process chain I am getting an Error Message for "PSA to InfoCube" as: Request was NOT posted successfully to data target (InfoCube) Message no. RSMPC163 Please what is the exact problem it means & what is the solution Rajesh Giribuw

  • Word wont't Save

    Hello, i have the same problem as it is described in this topic: http://discussions.apple.com/message.jspa?messageID=640245#640245 The solution is very good but after only one day the error was back again. Has anybody any idea how to solve the proble

  • Connecting by it self? virus infected

    Hi, occasionally (1~2 times a day) my X5800 tries to connect internet. it tries to connect wifis in the list, also I put password, and ask to connect setting but it succeds connecting using gprs, sends 28kb, receives 577kb. I've seen while at home it

  • Problem while importing NWDI components in CRM5.0.

    Hi All,     I'm facing problem while importing NWDI components in CRM5.0. Imports are running for long time and failing. Could anyone please help me out. Thanks in advance. Regards, Deepthi.