on 09-21-2006 11:29 AM
<p>How can i change the sort fields depending on a value of a paramete?</p><p>Like i have a Bool parameter and want to twiest the sort fields of the subreport depending on the parameter value.</p><p>My purpose will serve if i can change a group depending on the parameter.</p><p>looking for help out there.</p><p>-Pathik</p>
In the Change Group Options dialog, there is a check box that called "Use Formula as Group Sort Order". When toggled on, click on the conditional formula button.
Put in the formula for your evaluation as you wish. For example:
If {?MyParameter} then crAscendingOrder else crDescendingOrder
Don't forget that there is the option for crOriginalOrder if you so choose.
- Kathryn Webster (Report Design Consultant)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Kathryn,
i couldn't find the "Use Formula as Group Sort Order" in CR10. But i understand what you said. i did it by using the written formula (which is actually giving two different DB fields for sorting) as a group. is that what you mean?
I can use that same formula in Sort Expert to sort instead of using it as a group if the data is on the detail section only.
Thanks again.
-Pathik
Notes : The company i am working with named "Webstercare".
Hi Pathik.
You are right on. Your solution is what I would have done too if I didn't have this cool new feature. I guess it was added even more recently than I remember. 🙂
Too funny about the company name that you work for. I'm just new to this name myself. Still getting used to it. I hope it's a good company (like the family is to me). ;-)Â
    - Kathryn Webster (Report Design Consultant)
          Kat's News: http://diamond.businessobjects.com/blog/279
Have you asked this question in the development forum? In the section that applies to your development environment of choice?Â
    - Kathryn Webster (Report Design Consultant)
          Kat's News: http://diamond.businessobjects.com/blog/279
 I'm sure you've seen by now I want to help everyone. Unfortunately, Runtime stuff is purely SDK driven. Please persist with the developer forum. They are the right guys for the job.
Kind regards,
   - Kathryn Webster (Report Design Consultant)
          Kat's News: http://diamond.businessobjects.com/blog/279
In order to do this, you need to set up a parameter with limited default values. Then you create a formula based on the allowed default values for the parameter. You then use the formula as either your grouping or sort option. For example, there is a sales report that you would want to sort by either salesperson or region:
Your parameter would prompt for either salesperson or region. Your formula would look something like this:
 If ?Parameter = "Salesperson" then SalesTable.Salesperson else SalesTable.Region
 You would then use this formula as either your grouping or sorting criteria.
 Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It depends on what you want to do as to how you develop and design. If you are wanting to just change sort order, you will have to set the sort order conditional formula to something like crascendingorder. Look up these types of words in the help system.
Also, another level of complexity, of perhaps changing the field being sorted, you could use a Formula to change the field being displayed (and then use the above mentioned sort order conditional formula on top of that).Â
   - Kathryn Webster (Report Design Consultant)
          Kat's News: http://diamond.businessobjects.com/blog/279
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a Parameter with your choices. Create a formula with your sort parameters: like @Sort
If {?SortField} = "Item" Then ({CHG_Change.Item}; crascendingOrder ;)<br />Â Â Â Â Â Else ({@Date }; crdescendingOrder;)
Move your formula into a header and then suppress. click on your sort icon and move @sort to the sort process.
I was able to get that to work.
However, what I cannot find is how to sort on more than one field.. I am unable to locate a statement that executes properly, only error free.
*Robert *
<p> </p><p>How can i change the sort fields depending on a value of a parameter?</p> <p>Like i have a column_name as a parameter and want to sort the fields of the report wrt to the column_name dynamically .</p><p>please help me.............. </p><p> </p><p>- Venkat.S <br /></p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.