Change the sort order (ascending/descending) based on parameter field

I have created a formula on a subreport to change sorting based on variables.
select {?Pm-@Sorting}
case "property_type_desc ASC" :
{owned_property.property_type_desc}
case "property_type_desc DESC" :
{owned_property.property_type_desc}
default:
({owned_property.property_type_cd}; )
how can I change the sort order ascending and descending using the formula??
Thanks, Jessica

Try this
1. Create a parameter with 2 default values in the picklist: Descending and Ascending.
NOTE:
In Crystal Reports version 5 or 6, it is not possible to have a pick a parameter value from a list. The user must enter a specific value, guided by the prompting text. For example : To Sort in Ascending order type A, to sort in Descending order type D.
u2022 On the 'Insert' menu, click 'Parameter', then click 'New'.
u2022 Type the name and prompting text for the parameter in the corresponding boxes.
u2022 In the 'Type' box, click 'String'.
u2022 Click 'Set Default'.
u2022 In the 'Value to add' box, type 'Descending' then click '>' to move it to the 'Default Values' list.
u2022 Repeat the above step for 'Ascending'.
u2022 Click 'OK', then click 'OK' again to return to the report.
2. Create 2 formulas based on the field you want to change the sort direction on:
u2022 On the 'Insert' menu, click 'Formula', then click 'New'.
u2022 Create this formula:
@Asc
If {?Parameter} = "Ascending" then
u2022 Save this formula and close the Formula Editor. This brings you back to the Formula tab of the Insert Fields dialog box.
u2022 Click 'New' and create this formula:
@Des
If {?Parameter} = "Descending" then
u2022 Save this formula and close the Formula Editor.
u2022 Click 'Close' to return to the report.
4. Sort the report based on these two formulas.
u2022 On the 'Report' menu, click 'Sort Records'.
u2022 In the 'Report Fields' list, click {@Asc} and move it to the 'Sort Fields' list.
u2022 Under 'Sort Direction', click 'Ascending'.
u2022 In the 'Report Fields' list, click {@Des} and move it to the 'Sort Fields' list.
u2022 Under 'Sort Direction', click 'Descending'.
u2022 Click 'OK' to return to the report.
Once you preview the report you will be prompted to select a parameter value, which will determine how the report is sorted.
Regards,
Raghavendra

Similar Messages

  • How do I change the sort order in the file picker?

    Hi there,
    I've recently hit a problem with the Save and Open dialogs in Mavericks. Some how I have changed the sort order within the Column View so that it sorts by modified date and no longer by name. Unfortunately I can't work out how that happened or how to get it back so that it sorts by Name.
    Please could anyone help?

    Normally, you click on this thing (shown below) and select the sorting preference.

  • Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?

    Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?

    Did anyone find a good way to sort the shared albums better, so that the ones you share with can better find their way around.
    You can arrange them manually in an album, select all and use the Photos ➙ Batch Change ➙ Date to menu option and check the box to add a set interval between photos. That will let the photos be sorted by date and be in the order you want:
    OT

  • HT2470 Why does this not explain how to change the sort order?

    Why does this (i.e. support at Apple.com) not explain how to change the sort order? I can "arrange" by Date Modified for example but it won't let me switch to use most recent dates first. Also, what is Apple-speak for arrange versus sort anyway? It seems I used to be able to click on a column heading in finder and get a drop down arrow allowing me to change the sort sequence.

    Arrange roughly translates to "group the items in the folder." Sort is how each group is ordered. If you have arrange set to none, you can sort by anything. However, there is no way in the Arrange/Sort menu to choose the direction. The only way to do that is in the List View, and you must have Arrangement set to None.
    I've submitted an Enhancement Request to allow choosing sort direction from the Arrange/Sort menu, but I haven't ever gotten a response, which is good and bad. Good because they will often respond that they have considered it and don't plan on implementing. Bad in that they've haven't implemented it.

  • How do I change the Sort order for Music Video's on the iPad

    Hi All,
    Apologies if this has been dealt with elsewhere - I can find posts about sort order for TV Shows and Movies but not Music Video's.
    When I sync my music video's the appear in Track order in the video app and I cannot find how to change the sort order to 'by Artist' (or any other order come to that).
    Any ideas please>

    Hi!
    Im afraid I believe this cannot be done yet. Sorry!
    You can try submitting feedback to apple by clicking [here|http://www.apple.com/feedback/ipad.html] if you wish.
    Hope this helps!

  • How change the sort order of searched items so last search item shows first. I DO NOT mean the order of search engines, but existing searches by down arrow key

    I want to be able to change the sort order of items I have already searched for in the search box. I want to be able to hit the down arrow key and see my previous searches in the order of last search showing first. At the moment I have no idea how it is sorting and it's very annoying to have to re-type a query I typed 5 minutes earlier but because I typed in another 10 since it is lost somewhere in the list. Can this be done, I have googled but did not find the topic anywhere. Just to clarify, I DO NOT MEAN the order of search engines (which is all that comes up in google), I mean the actual text typed in which has been saved in the drop down list.
    Thanks

    The "form fill" feature uses a "frecency" algorithm, frequency + recency, similar to the address bar autocomplete list.
    I found an extension that seems relevant, but the reviews are old so I'm not sure it's still working: [https://addons.mozilla.org/en-us/firefox/addon/searchbar-autocomplete-order/ Searchbar Autocomplete Order].
    But... is the autocomplete not working? I would expect that typing a couple characters of the earlier query would filter the list so you can easily select it? Or is the problem that the list doesn't remember enough searches for that?

  • How do you change the sort order of mp3 songs?

    I have transfered MP3 files from my PC to itunes & iPod and created my own compilation albums for some of my favourite artists. However I would like to change the order of the songs but I dont know how to do this. I cant see what itunes or the ipod is using to determine the sort order!
    thanks
    Tom

    tinny's advice will work if you gave them an album name and they are actually listed in your library as an album. (Under Get Info, just tell it track 1 of 10, 2 of 10, etc.)
    IF you created a playlist for the album, click on the column for the track numbers and then click and drag the songs into the order you want.

  • How to change the sort order of complex table in drop down

    Hi Team,
    I have a complex table which is working but the sort order i want in a different way. How can i change?
    Regards,
    Gupta

    Gupta,
    My screen field definitions are as follows:
    1. Location
    2. Partner
    --In my previous reply, the first screen shot is without any parent index. So it is giving all values in alphabetical order only.
    --After that I created parent index for partner with location, So the partner values are depend on location chosen.
    In my TEST1:
    --I just selected "Andhra pradesh" as location, In partner field drop down it is showing "Ragava" "Suman" "Sunitha" only.
    --Because these are only the values belong to "andhra pradesh" location and these are coming in alphabetical order only.
    TEST2:
    --Here I selected "Gujrat" as location, In partner field drop down it is showing "Avinash" "Mohan" "Suman" which are belong to "Gujrat" location, These are also in alphabetical order only.
    Hope this clears now. Still any query please post.
    Thanks,
    Swaroopa.

  • How do you change the sort order of a Stack on the Dock in List view?

    I want to change the 'Date Added' sort in the list view mode of a stack from descending to ascending.
    I have the Downloads stack sorted by 'Date Added', however I would like to reverse the order of this sorting. When I open the stack, it shows the oldest files at the bottom and newest files at the top. Since there are many hundreds of files, the newest files are actually hidden and I must scroll up to access them. When I access this folder I want to see the most recent files first, at the bottom of the list nearest the stack icon, not the files I downloaded years ago.
    I prefer to use the traditional List view for Stacks because it is faster (no animations or loading preview icons) and easier to navigate visually. Please do not suggest a different view mode such as fan view or use-new-list-stack.

    Have you tried changing the list with the numbers? (See the screen shot)

  • How to change the Sort Order?

    Hi,
    I want to do a sorting on 3 fields in the order say for Eg:Name,Number,Dt.On the report I have grouped by Number so by default it appears in the sort list(Asec),So my sort order on the report looks like Number,Name,Dt but as per the requriment I want to sort it first by Name, then by Number, and then by Dt.
    Is there a work around for this...

    Try to insert a summary on name field in group footer like maximum(,).
    Now go to report>group sort expert>select all based on maximum(,)
    Now the report sorts based Name field instead of number field
    Regards,
    Raghavendra

  • How do I change the sort order of files viewed in Save As and keep the new sort order permanent?

    When I find a graphic I want to save, I choose Save Image As. I navigate to an existing folder but the items shown are not arranged by name. I right click on the Save As window and choose Arrange By Name. The sort works and I save my item. Later when I go back to the same folder the items are not arranged by name. I want the "arrange by name" option to be permanent.

    The same as with a file browser. The bar at the top of the window;
    name, size, date''' . . . . . . .''' click what you want.

  • How do I change the sorting order of the pictures I want to take from an album to a photo book?

    I have an album that contains over 300 pictures.  I put them in the order I want them to appear in the photo book I want to make.  When I select the entire content and choose Create Book, all the pictures appear on the right hand side of the book in two long columns, like they're supposed to.  Problem is, they're not in the same order as they were in the album and I have to go searching for each picture because they're all over the place.  I get the feeling I'm missing something very simple, yet crucial.  Any help would be much appreciated.  BTW, I use iPhoto 9.1.3 on an iMac running 10.6.7.

    Metalink note refers:
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=204902.1
    1) Open Discoverer Admin Edition.
    2) DO NOT open any Business Areas.
    3) Create a new Business Area with any old table in it (ex: SCOTT.EMP or a custom folder SELECT 'test' col1 FROM sys.dual)
    4) Navigate to File -> Open.
    5) Open up ONE Business Area (The one you want to appear first)
    6) Navigate to File -> Open
    7) Open up the next Business Area (The one you want to appear second) ....Repeat for all Business Areas..... 8) Select all of your REAL Business Areas and export (exclude the dummy Business Area)
    9) Take a DB export of the EUL owner as a backup.
    (you need to log into SQL*Plus or another SQL tool as the SQL owner to do this - take an export of all the tables of the schema)
    10) Delete ALL Business Areas.
    11) Import the .eex file.
    You might be able to skip Step 9 if your database gets backed up anyway or if you trust the EUL export and import.

  • Changing the sorting in the Icon view

    This has been giving me a headache since I upgraded to Lion since it was released. I deal with very large numbers of files of various types and since OS X first was released it was easy for you to sort items in a folder by type however with Lion Apple dropped the ball on this. In the Icon View it is foolish not to have the folders listed first in the sort or arrange order. If you have folders that have folders in them to help separate large projects it used to be simple to navigate but now Apple has made this simple navigation task a total pain. Since you have to scroll down to get to the sub folder and heaven help you if you have to do this several times. There is no good reason not to allow the user to change the sort order. A simple search shows I am not alone in this and Apple has yet to respond this problem.
    We are up to version .3 on lion and this still is a nightmare. I understand and agree with the strategy to make iOS and OS X to be similar for the novice user but to do so by sacrificing the functionality of OS X is well stupid. If I wanted an iPad I would have bought one  not a Mac Pro and a MacBook Pro to work on. You cant run the programs I use a super sized iPhone. Till you can please don’t cripple OS X. It can't be a huge task to allow the user in the icon view to chose ascending or descending order and lock that choice in. Also have it automatically adjust the arrangement if you resize the window so you dont have to scroll side ways only up or down.
    Finder worked like this since I switched to Mac's back in 2002. I have been very happy with OS X and Apple till this change. This is not a small issue for me. I have counting external and internal drives totaling 14 TB's of storage and add about 1 TB a month with the projects I now have. I hope this gets fixed soon it has me worried that Apple is solely catering to the iPad and iPhone users. I didn't spend nearly 10K$ for a new workstation and laptop to have it function like an iPad.
    For the record I do like the iPad but you can't run Photoshop, MS Office, Poser or CAD programs on an iPad and if you could it would take it weeks to do some of the tasks that a dual quad core can do in minutes.
    There are ways to bring back many functions that were changed in Lion such as hiding the scroll bar or reversing the scrolling direction why not retain the sort options that your customers have been using for years? This small change reduces productivity and thus reducing my profit margins and not to mention increasing aggravation.

    I actually didn't read your whole dissertation, but if you want to know about sorting in the Finder, then this is how it works:
    There are two modes of organizing the layout of the items in the Finder. There is an Arrangement which is grouping similar characteristics together. Then, there is sorting which sorts the items by some criteria, like name, date, etc.
    The Arrangement and Sorting functions are both in the same menu item or button on the toolbar. Arrangement is primary, and Sorting is secondary. You can get to the Sorting options by holding down the option key and clicking on the button or menu option.
    You can have both an Arrangement and a Sort, depending on the Arrangement chosen.  Arranging by Name or Date doesn't offer any other sorting options. Arranging by Kind, or Application, or Label will allow you to sort each group by some criteria chosen from the Sort options.
    If you Arrange by None, you can sort by any of the other criteria.
    I have run into a bug where you can choose the sort order once arranged. You can usually reverse the sort order by going into List View, arrange by None, and set the sort direction in the column headers.

  • Can't Manually Change Collection Sort Order

    When trying to manually change the sort order of any collection I get the following error message:
    Database "/Users/Dan Donovan/Pictures/Lightroom/Lightroom 5 Catalog.lrcat": AgLibraryCollectionImageOzSortOrder.positionInCollection may not be NULL
      Statement:  INSERT OR REPLACE INTO AgLibraryCollectionImageOzSortOrder
      ( collectionImage, collection, positionInCollection, ozSortOrder )
      VALUES( ?, ?, ?, ? )
    Any suggestions?
    Thanks!
    Dan

    Some others have reported this on the official feedback forum:
    LIGHTROOM 5.5: Error when moving grouped images in Grid view.
    Lightroom CC Re-Sorting within a collection giving error message
    LightRoom 5.5 OSX 10.9.3: Custom sort within a collection gives an error (screenshot attached)
    Please add your opinion and votes to those threads.  The threads include some workarounds you might try.

  • Changing Search sort order for Simplified Chinese

    We're generating a Simplified Chinese WebHelp system using Robohelp 10 and we need to change the sort order in the Search results so that it follows the pinyin order instead of "Y, Z, M, T" (Referring to 仪,准,美,通). Is there a way to do this?

    I sort of found a workaround, but it may lead to other problems, so use it at your own risk.
    It also requires a bit of work.
    The idea is to use the sort order for Japanese by specifying the following in the IX reference page.
    Symbols[\ ];数字[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;あ;い;う;え;お;か;き;く;け;こ;さ;し;す;せ;そ ;た;ち;つ;て;と;な;に;ぬ;ね;の;は;ひ;ふ;へ;ほ;ま;み;む;め;も;や;ゆ;よ;ら;り;る;れ;ろ;わ;ん;[ ]
    <$symbols><$numerics><$alphabetics><$kana>
    Then, you need to capitalize the first letter in the bracket used for sorting for every index entry.
    Example:
    Instead of
    画面[hua4mian4]
    specify
    画面[Hua4mian4]
    Now, I'm wondering if there is a way to do a search and replace on all index entries to capitalize the first letter...

Maybe you are looking for

  • BEA-381951 JCA inbound request only invocation failed

    Hi there, I'm using OSB to create a series of interfaces between a couple of applications. Since this Monday for some reason whenever I try to test my application on the server I'm getting the error <BEA-381951> JCA inbound request only invocation fa

  • Can we execution  sql script through java ?

    Hi All, Can we execute sql script ("name.sql") through java programe. I am not talking about reading sql script one by one and excute. I just want to send this sql script to oracle console. Or any body can give other alternative I have to lot of db o

  • Need auto PR creation using ME51n from excel file

    Hi experts,                       I have a requirement for above mentioned subject line I have gone through BAPI_PR_CREATE fm . need to test the fm successfully, so that i can do the programming. so could you tell me what are fields,i need to take to

  • Moving entire library from shuffle to nano

    I currently have a Shuffle but I'm looking to upgrade to a 4gb Nano. How do I move all of my songs to the new Nano? How will this affect the songs I've purchased on iTunes? I have tried saving my library before (for back-up) and it didn't work. Thank

  • Moving SQL Database

    Im having issues moving the Primavera data on the local SQL server (currently on a laptop) onto a networked SQL server. All the data has been copied over, re-created the privuser and pubuser logins - the connection manager connects succesfully. <br /