Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: dynamic sort Post Reply Post New Topic
Author Message
Macavity
Groupie
Groupie


Joined: 24 Sep 2012
Online Status: Offline
Posts: 93
Quote Macavity Replybullet Topic: dynamic sort
     Posted: 01 Jul 2014 at 3:35am
Hi,

I created a parameter field ?sort field with 3 set values  "Item", "Buyer" "Supplier".

Then created a formula

select ?sort field

case "Item" : db.item

case "Buyer" : db.buyer

case "Supplier" : db.supplier

default : db.item

I want to add this formula in the sort expert, but it doesn't appear on the left. How to solve this ?


IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 01 Jul 2014 at 4:50am
change the formula to something like this:

if {?sort} = 'Item' then {table.item} else
if {?sort} = 'Buyer' then {table.buyer} else
if {?sort} = 'Supplier' then {table.supplier} else
{db.item}
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum