Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3022

Re: Adding sortfields in crystal reports 2013

$
0
0

Instead of doing this in your application, try using a parameter in the report.  Here's what you can do:

 

1.  Create a parameter, which I will call {?SortOrder} which has the values "Code" and "Description".

 

2.  Create a formula that will provide the values for the sort.  It might look like this (assuming that both fields are string fields!):

 

{@SortOrder}

If {?SortOrder} = 'Code' then {invoices.article_cod} else {invoices.article_descrip}

 

3.  Sort the report on this formula.

 

Your application would then just have to supply the value for this parameter base on what the user selects in the application.

 

-Dell


Viewing all articles
Browse latest Browse all 3022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>