Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: About displaying items Post Reply Post New Topic
Author Message
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Topic: About displaying items
    Posted: 02 Dec 2010 at 7:19am
I have a column that contains all sorts of integers. I have a parameter which allows the user to choose one of the three filter options: 'pos', 'neg', or 'all'

I then wrote formula that will display only the rows that match the filter like


if ({?myfilter} = 'pos') then
   {number} >= 0
else if ({?myfilter} = 'neg') then
   {number} < 0


This works, so then I went to do my last filter option, but wasn't sure how to do it. I then found that this works


else
   {number} = {number}


Which I don't really like because of how it looks.
Are there other ways to do it?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Dec 2010 at 7:39am
select statement as :
({?myfilter} = 'pos' and {number} >= 0)
or
({?myfilter} = 'neg') and {number} < 0)
or
({?myfilter} = 'all')
 
 
Suppression as :
NOT (
({?myfilter} = 'pos' and {number} >= 0)
or
({?myfilter} = 'neg') and {number} < 0)
or
({?myfilter} = 'all')
)


Edited by DBlank - 02 Dec 2010 at 7:47am
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 02 Dec 2010 at 7:48am
Hmm so that's how crystal selects/suppresses things.
alright thx!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Dec 2010 at 7:55am
It is one way.
Try and avoid using If statements in your select.
Both the select and suppress options are looking for a boolean evaluation.
Select:TRUE=include and FALSE=exclude
Suppression: TRUE=Suppress and FALSE=Show


Edited by DBlank - 02 Dec 2010 at 8:06am
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.016 seconds.