Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sorting by Parameter Post Reply Post New Topic
Author Message
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Topic: Sorting by Parameter
     Posted: 11 Jan 2012 at 4:30am
< style="left: 0px; top: 0px;" id="stL" ="stL" height="350" ="" Border="0" width="353" allowTransparency="true" name="stL" scrolling="no">
I want to create parameter called Division sorted by Action date and Disposition date?
can we craete drop-down parameter?

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 5:44am

I am not following your question exactly, but if you want to create a parameter that has a dynamic lov that is defined by your data set that is possible.

IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 11 Jan 2012 at 7:29am
I mean the user can have the choice to sort by Action date and Disposition Date?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 7:33am
do you mean OR?
If you mean AND what are the options for AND? JUst action Date, just disposition Date ot both?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 8:05am

If you meant OR

create a Parameter with two LOV text options: "Action Date" and "Disposition Date"
Create a fomrula field as
if {?param} = "Action Date" then {table.ActionDate} else {Table.DispostionDate}
Place this formula field as the primary sort in the sort expert (either asc or desc)
IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 11 Jan 2012 at 11:31am
I mean AND can you write the formula Please.Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 11:44am
I do not understand how you can sort by both?
Each row is sorted by one or the other...Do you mean if one value is empty sort by the other? Or always sort by the lower value? Or soemthing like that?
IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 11 Jan 2012 at 12:47pm
Yes , means if one value is empty sort by the other...
IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 12 Jan 2012 at 3:02am
A parameter that the user can see the report by action date or Disposition date or by division (user option)
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 12 Jan 2012 at 3:52am
Originally posted by Kerkuk

A parameter that the user can see the report by action date or Disposition date or by division (user option)
 
That's an or then.... DBlank's original formula should work.
 
The below incorporates the division field;
 
if {?param} = "Action Date" then {table.ActionDate} else if {?Param} = "Disposition Date" then {Table.DispositionDate} else {table.Division}


Edited by rkrowland - 12 Jan 2012 at 3:54am
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