Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: sorting report dyanamically Post Reply Post New Topic
Author Message
philany
Newbie
Newbie
Avatar

Joined: 17 Jan 2008
Location: South Africa
Online Status: Offline
Posts: 6
Quote philany Replybullet Topic: sorting report dyanamically
    Posted: 17 Jan 2008 at 4:58am
guys I'm new in crystal reports. I need 2 sort records dynamically any 1 with help I will appreciate it.
pk
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 18 Jan 2008 at 1:05am
you can do it using formula. you have to create a pramater with values ascending and descending. then create a formula  for e.g
let takes a paramter called "sortorder", so the values for this paramater would be "ascending" and "descending"
now create a forrmula "sort" which has following syntax
if {?sortorder} = "ascending" then
  ({table.field}; crascendingorder)
else
  ({table.field}; crdescendingorder)
 
promp the user to select sortorder.
In the record sort  put this formula @sort. also place the @sort formula in pageheader and supress it.
 
 
 
Thanks
Savan
IP IP Logged
philany
Newbie
Newbie
Avatar

Joined: 17 Jan 2008
Location: South Africa
Online Status: Offline
Posts: 6
Quote philany Replybullet Posted: 21 Jan 2008 at 4:22am
Thanx a lot. It worked.
pk
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.