Break Order Attribute (Asc/Desc) in Reports

Please forgive me my ignorance.
I have a dummy column that I use to select another column into. I set the break attribute on it as ascending.
Now my user wants it either way i.e. ascending or descending.
Is there way to change the break order attribute to change sorting dynamically depending on inputs.
Thanks in advance to all who reply.

I was hoping that someone would know how I can modify the
ORDER BY 1 DESC,27 ASC part
The ORDER BY 1 DESC,27 ASC part is generated by break attributes. I would like to modify the "DESC" dynamically from within the report so I could change it as needed.
I don't know if it can be done via one of the srw package functions... and if so, which one and how. That was where I was trying to go.

Similar Messages

  • Is this Oracle Reports bug – "break order property" in "group above" report

    Is this Oracle Reports bug – “break order property” in "group above" report
    Could anybody confirm that in "group above" report, we could only order the brake column's values with ""none" or "ascending" or "descending" provided by "break order property"?
    In the following example, “Dept” is brake column. Oracle Reports allows us to order values in “Dept” with “descending” provided by “break order property”:
    Dept 30
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 20
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 10
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    or “ascending” provided by “break order property”:
    Dept 10
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 20
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 30
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    I need to do:
    Dept 20
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 10
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 30
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Could I do this? Could anybody confirm that we could never ever do this, or If yes, how?
    Millions of thanks for advice.
    M.Z.
    Edited by: jielan on Sep 18, 2010 8:23 AM

    Why should that be a bug? You have a custom requirement and have to find a way to fulfill it. But, what is your actual sorting order? Do you have only this three departments? If so, you could add an addtional column in your query like
    DECODE(DEPT,  20, 1, 10, 2, 30, 3, 4) SORTINGput that column in the same group as dept and sort after that new column.

  • Decode in order by - asc/desc

    I'm trying to be able to dynamically change the asc/desc in the order by.
    Here is some sql that works:
    select * from transactions order by decode(somevar,'a',acct_nbr,'c',card_number,acct_nbr) asc
    What I wanted was something like this:
    select * from transactions order by decode(somevar,'a',acct_nbr,'c',card_number,acct_nbr) decode(anothervar,'a',asc,'d',desc,asc)
    but this doesn't appear to work. Am I missing something, or is there another way.
    Thanks in advance,

    There are a bunch of restrictions on ordering when you use union all. It usually either requires the numerical position of the column, so if you want to order by the first column, then you order by 1, or a column alias, which sometimes can be used in only the first select and is sometimes required in all of them. However, even if you order by column position, such as order by 1, it does not seem to allow this in a decode. The simplest method is to use your entire query containing the union all as an inline view in an outer query. Please see the following examples that do this and also demonstrate how to get the order by options, including ascending and descending that you desire, assuming that your columns are of numeric data types.
    scott@ORA92> -- sort by acct_nbr asc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: a
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: 1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             1           3
             2           4
             3           2
             4           5
             5           1
    scott@ORA92> -- sort by card_number asc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: c
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: 1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             5           1
             3           2
             1           3
             2           4
             4           5
    scott@ORA92> -- sort by acct_nbr desc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: a
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: -1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             5           1
             4           5
             3           2
             2           4
             1           3
    scott@ORA92> -- sort by card_number desc:
    scott@ORA92> ACCEPT somevar PROMPT 'Enter a to sort by acct_nbr or c to sort by card_number: '
    Enter a to sort by acct_nbr or c to sort by card_number: c
    scott@ORA92> ACCEPT anothervar PROMPT 'Enter 1 to sort ascending or -1 to sort descending: '
    Enter 1 to sort ascending or -1 to sort descending: -1
    scott@ORA92> SELECT acct_nbr, card_number
      2  FROM   (SELECT 1     AS acct_nbr,
      3                3     AS card_number
      4            FROM   dual
      5            UNION ALL
      6            SELECT 2     AS acct_nbr,
      7                4     AS card_number
      8            FROM   dual
      9            UNION ALL
    10            SELECT 3     AS acct_nbr,
    11                2     AS card_number
    12            FROM   dual
    13            UNION ALL
    14            SELECT 4     AS acct_nbr,
    15                5     AS card_number
    16            FROM   dual
    17            UNION ALL
    18            SELECT 5     AS acct_nbr,
    19                1     AS card_number
    20            FROM   dual)
    21  ORDER  BY DECODE ('&somevar',
    22                   'a', acct_nbr * NVL (&anothervar, 1),
    23                   'c', card_number * NVL (&anothervar, 1),
    24                   acct_nbr * NVL (&anothervar, 1))
    25  /
      ACCT_NBR CARD_NUMBER
             4           5
             2           4
             1           3
             3           2
             5           1
    [pre]

  • Needs rows to be listed in BEX in a particular order(not asc desc)

    See the thread.
    Needs rows to be listed in a particular order(not ascending or descending)

    To create a hierarchy you can go in RSA1, infoobject tag, find your infoobject, double click on it and set the flag with hierarchy under Hierarchy tag; save and activate and exit.
    Than right click and choose 'Create hierarchy'.
    After creating hierarchy, in bex properties of the infoobject you can set it to use this hierarchy.
    For second question, if there's a logic to define sort order, while you are loading data, you can write a routine in update rules to populate a specific infoobject with a value for the sort.
    Hope now it's more clear.
    Regards

  • Changing report order using the break order property

    I am trying to allow the user to pick the order of the report's data. This has lead me to ask the following questions:
    How can the break order property of a Database Column be set at runtime, specifically in the Before Report program unit??? (changing the order BY clause in the SQL query will not be sufficient because report builder enforces that at least one column�s break order in each Group, other than the lowest one, must be set at design time)
    How can the order of the Database Columns in a Group be re-arranged at runtime, specifically in the Before Report program unit???
    Thanks for any help that you can provide.

    Hi Kevin,
    I don't think that the "Break Order" property can be set programmatically, so it may not be possible to expose it to the users. I think it can only be an enhancement request to the product.
    Navneet.

  • Break Order overriding my ORDER BY clause

    Hi Experts,
    I have created a report in Oracle 6i where I am getting the ORDER BY clause at runtime. And in the datamodel query, I am using a lexical parameter to say, order by the column selected in the parameter.
    The problem am facing is, at runtime, the ORDER BY clause is being ignored by the report and it takes the column mentioned with break order property as 'Ascending' and sorts by that column.
    I am not able to set the break order property to None to all of the columns as the reports builder is erroring out asking me to have atleast one column set to Asc or Desc!
    Have anyone faced this problem before ? Is there anyway to get rid of this and make the report use by columns mentioned in the ORDER BY clause.
    Please note: I tried an explicit ORDER BY <columnname> in the data model query but still the report uses the break order value mentioned and sorts by that columns.
    Appreciate your help on the same.
    Thanks!

    Hi,
    there's a simple rule how this works. For every query you have one or more (hierarchic) groups in the data model. For the lowest group the ORDER BY is choosen for sorting and for the groups, not beeing the lowest group, the BREAK ORDER is choosen (and vice versa ignored).
    Regards
    Rainer

  • Change the order of columns in a report

    hi all.
    i can't change the order of columns in a report not just by altering the select statement. where can i change it?
    thanks.

    hi master
    sir i use 6i report i see full report but i culd not found
    report region and report attributes
    sir please give me step or idea or tree where report region and report attrinutes"
    thanking you
    aamir

  • List of SQL tables and attributes used in SSRS reports

    Hi,
    I have around 450-500 reports deployed in SSRS reporting server.
    All these reports are built on SQL from multiple databases, and these databases are having unnecessary tables and attributes.
    My requirement is to clean the unused tables and attributes from the databases. For this, I need the list of SQL tables and attributes used in these 450-500 SSRS reports.
    Is there any way to get this data?
    Regards,
    RK

    Hi RK,
    According to your description, you want to get a list of the tables and attributes used in all reports.
    In your scenario, you can query the ReportServer.dbo.Catalog table to get Report name, data source name, dataset name, and query used in the dataset with query below:
    WITH XMLNAMESPACES ( DEFAULT 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition', 'http://schemas.microsoft.com/SQLServer/reporting/reportdesigner' AS rd )
    SELECT ReportName = name
    ,DataSetName = x.value('(@Name)[1]', 'VARCHAR(250)')
    ,DataSourceName = x.value('(Query/DataSourceName)[1]','VARCHAR(250)')
    ,CommandText = x.value('(Query/CommandText)[1]','VARCHAR(250)')
    ,Fields = df.value('(@Name)[1]','VARCHAR(250)')
    ,DataField = df.value('(DataField)[1]','VARCHAR(250)')
    ,DataType = df.value('(rd:TypeName)[1]','VARCHAR(250)')
    --,ConnectionString = x.value('(ConnectionProperties/ConnectString)[1]','VARCHAR(250)')
    FROM ( SELECT C.Name,CONVERT(XML,CONVERT(VARBINARY(MAX),C.Content)) AS reportXML
    FROM ReportServer.dbo.Catalog C
    WHERE C.Content is not null
    AND C.Type = 2
    ) a
    CROSS APPLY reportXML.nodes('/Report/DataSets/DataSet') r ( x )
    CROSS APPLY x.nodes('Fields/Field') f(df)
    ORDER BY name
    For more information, please refer to this similar thread:
    Extract metadata from report server database
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Using Set Break Order property

    Hi,
    I create a Break Group with one column in the Data Model
    Open the Property Palette for the column and the Set Break Order property does not appear. However the Break Order property does appear and its values is asending or descending.
    Here's the definition for this property in Report Bulder Help "The Set Break Order Property is whether to set the order in which to display the column's values, using the Break Order property". This implies that if the Break Order property is set to something other than NONE, the Set Break Order is Yes.
    Another reference I have states " A point to be noted is that all break groups must have at least one column with the Set Break Order set to the Yes value".
    My concern/question is in all of the documentation I have read both properties appear, but only one appears in my environment. Am I doing something wrong? Is there a setting to be change to make both properties appear? I am using Reports 6i, on Win2000 and connected to an Oracle 8i database.
    Thanks in advance,
    Audrey

    Hi,
    This looks to be a documentation mistake. From Reports 3.0.5 onwards, We have removed the Set Break Order Property for columns and just added
    a "None" item to the Break Order property poplist instead. For columns which cannot be break columns, we do not even give the option of changing the Break Order from None to anything else. So just go-on desiging your Report with just one break order property, that is sufficient.
    Thanks,
    Rohit

  • Asc &Desc

    Hi! all
    i would appreciate if any one would clear me the concept of the
    order by clause using the ASC and DESC
    i have a table which has the few columns
    including the date the column as one of them
    Most of the Queires i deal with need to
    return the most recent records
    ( as each record entered today as date field entered ..today's date..)
    So...
    select * from
    <table_name>
    where rownnum <=10 **need to only first 10 records**
    order by datefiled desc
    hoping that i would get most recent at the top...
    but it falied...
    i tried with
    **Order by ASC*** it also returned same
    old ten records(1998) but not new(2000)
    Now i am confused with the concept of DESC/ASC
    does it work with DATE field...
    if not what would be best way to query the most recent records.(DATE FIELD)
    Experts please clarify my question ASAP
    Best Rgds
    null

    Hello Some,
    This type of subquery was first available in 7.3.4 (I think). You can find more about it in:
    Oracle8i SQL Reference
    Release 8.1.5
    Chapter 5 Expressions, Conditions, and Queries
    This type of subquery can be used instead of creating a view. You can also use it to bypass some limitations. A nice example is the CONNECT BY clause. When you use this, you have limitations. When you put the part with the CONNECT BY clause in such a subquery, you are able to do a lot more in this SQL-statement than otherwise.
    SELECT TRE.TREELEVEL, TRE.PARENTID, TRE.NODEID,
    DOC.URL, DOC.DESCRIPTION,
    NVL(IMG.CLOSEDIMAGE, nvl(IMG.OPENIMAGE, 'folder')) CLOSEDIMAGE,
    NVL(IMG.OPENIMAGE, 'folder') OPENIMAGE
    FROM (select level TREELEVEL, nod.documentid, nod.nodeid, nod.nodeseq, nod.parentid
    from web.nodes nod
    start with nod.nodeid=&TreeRoot
    connect by prior nod.nodeid=nod.parentid) TRE,
    WEB.DOCUMENTS DOC, WEB.IMAGES IMG
    WHERE TRE.DOCUMENTID=DOC.DOCUMENTID(+)
    AND DOC.IMAGEID =IMG.IMAGEID(+)
    ORDER BY DOC.DESCRIPTION
    null

  • Dynamically changing break order property

    I have a report that has four different fields that the user can break on. Does anyone know how to dynamically change the break order depending on which field the user choses as a parameter.
    Thanks

    Alias the break columns.
    select &p_col1 break, col2...
    from tablename
    then send to the report the name of the break group column.
    The initial value of p_col1 should be set to 'xxxxxxxxxxxxxxxxx' enclose in quotes. Take care at the length of the string. This is the only thing that determines the length of the field.

  • Count of Service Orders issue in the Bex Report

    Hi Experts,
    I have a report displaying the Count of Service Orders. The count of service orders I have brought using replacement path variable.
    The count is getting displayed correctly. When I have the service order in a single record.
    The moment I drag and drop the material from the Free Characteristic pane. The count of Servie order increases because the same service order is repeated for Material A ( in the First Line) and Material B ( in the Second Line ).
    And my report doesn't have any keyfigure to built an Exception Aggregate.
    Can anyone please tell me how do I make my Count to read only the unique Service orders.
    Thanks

    Hi Shanthi Bhaskar,
    Thanks for your link.
    I have already referred to this link and created the count of Service orders. But it is not uniquely identifys the service order numbers.
    Irrespective how many number of time the same service order gets repeated in the report it should only give me a count as 1 for other service order as 2.
    Hope its clear.
    Thanks

  • How to Get Navigational attributes of dso in Report ...

    Hi i have a dso with many fields ,
    In the report i need to get some navgational attributes which are in dso..
    How to Get Navigational attributes of dso in Report ..??
    Thanks All..

    hai naiduz,
    in the dso u find folder with navigational attributes, there select the Navigation check box the fields which u need in the report.
    and further if ur dso through multiprovider and also identify them at multi provider level.
    then u will be able to see the fields at query designer level, then u can use the nav. fields u need in the report.
    regards,
    Vj

  • How to add a specific order type into any particular report

    Hi All,
    How to add a specific document type(order type) into any particular report in order to review OTD performance.
    I need to add one specific order type to existing reports which will help to check the performance of the delivery type for that particular order type to the users.
    Thanks,
    Raj

    Hi Rajesh,
    thanks for the reply when i tried as the way you said.. but the system is asking more details like varient. so if you can clearly specify the process for order type (VOV8-- table TVAK) so it will helpful for me.
    Thanks
    Raj

  • How to Display  'purchase order text' in MM03 using report program

    Hi Friends,
    Can anybody suggest me how to display 'purchase order text' in MM03 using report program.
    'Purchase order text' tab displays purchase long text of particular material .
    I coded as:
          SET PARAMETER ID 'MXX' FIELD 'E'.
          SET PARAMETER ID 'MAT' FIELD k_final-matnr.
          SET PARAMETER ID 'WRK' FIELD k_final-werks.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    It displays Purchasing tab other than Purchase Order Text tab of MM03.
    Please suggest me how can i solve this.
    Is there any parameter id to set values for Purchase Order text tab

    >
    Madhu Mano Chitra wrote:
    > I want how to navigate to MM03 'Purchase Order text'  tab/ view using ABAP code.
    > could any suggest me
    You can call a transaction and pass it a BDC table that tells it where you want it to go.  You have to work out for yourself what to put into the BDC table.  The code below works for tcode CATSSHOW.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
       CLEAR bdcdata_wa.
        bdcdata_wa-program  = 'CATSSHOW'.
        bdcdata_wa-dynpro   = '1000'.
        bdcdata_wa-dynbegin = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'SO_STATU-LOW'.
        bdcdata_wa-fval = '20'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'ANDZEIT'.
        bdcdata_wa-fval = SPACE.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'PAST'.
        bdcdata_wa-fval = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        IF p_selscr = SPACE.
           CLEAR bdcdata_wa.
           bdcdata_wa-fnam = 'BDC_OKCODE'.
           bdcdata_wa-fval = '=ONLI'.
           APPEND bdcdata_wa TO bdcdata_tab.
        ENDIF.
        opt-dismode = 'E'.
        opt-defsize = 'X'.
    CALL TRANSACTION 'CAPP' USING bdcdata_tab OPTIONS FROM opt.

Maybe you are looking for

  • Error in documents parking and posting

    Hello, After I parked the document of vendor payment using F-65 , While I validate and post the documents using FBV0 I met a error as following: " Formatting error in the field BSEG-PRCTR; see next message Message no. 00298 Diagnosis During batch inp

  • Can't sign in to my Creative Cloud desktop app.

    Hi, I'm new here. I have installed Creative Cloud ver. 2.5.1.369, and when I try to sign in I just get a message that says "You've been signed out". I have followed this: http://helpx.adobe.com/creative-cloud/kb/unable-login-creative-cloud-248.html 3

  • Agenda not in sync

    First i had an iphone which is in sync with my windows outlook agenda. Now i want to add this agenda to my mac book pro. I've added the agnem=nda on my iphone to the cloud. `Nevertheless on my mac book pro, although it is empty. Anyone who can advise

  • Charging PlayBook won't allow standby

    My PlayBook is currently charging and every time I press the power-button to go to standby-mode, the screen comes back on and wants me to log in again. I hope this is a bug and not a "feature". I know that charging while turned off is not possible (a

  • Recouping Images of the Data base - URGENTE!!!!

    I am not obtaining to recoup the image of the data base, this thus appearing <img src="java.io.ByteArrayInputStream@a8a81c">.... The code that I am using is the following one... Somebody can me help...????? <%@ page import="java.sql.*" import="java.i