Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: What is the crystal equivalent of the WHERE comman Post Reply Post New Topic
Author Message
Ronny101
Newbie
Newbie


Joined: 12 Oct 2011
Location: Canada
Online Status: Offline
Posts: 18
Quote Ronny101 Replybullet Topic: What is the crystal equivalent of the WHERE comman
     Posted: 18 Oct 2011 at 5:52am

Hi,

If I have few lines in a group but I want to show only 1 or 2 lines depending on the date and quantity in the line, I can do it in SQL using the WHERE command.  What is the crystal equivalent of the WHERE command?

Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 18 Oct 2011 at 7:00am
if you are looking to filter the data on your report, Report/Selection Formulas/Record.
 
create logic (usually an if else statement) that returns true for records you want to keep....like:
if {table.field} > 1 then true else false
or more simply
{table.field} > 1
 
HTH
IP IP Logged
Ronny101
Newbie
Newbie


Joined: 12 Oct 2011
Location: Canada
Online Status: Offline
Posts: 18
Quote Ronny101 Replybullet Posted: 18 Oct 2011 at 7:50am
Thanks, but I don't think I expained myself correctly
I have done what you suggested using the runing total and that how I created the logic.  My problem is when I use the select expert to only show the correct logic I don't have the logic function available to choose
Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Oct 2011 at 7:59am
group filtering can only be done via an insert summary on a group. Running totals and variable formuals cannot be used for group select statements.
IP IP Logged
Ronny101
Newbie
Newbie


Joined: 12 Oct 2011
Location: Canada
Online Status: Offline
Posts: 18
Quote Ronny101 Replybullet Posted: 18 Oct 2011 at 8:16am
How about doing it from the details without grouping, any way to use the runing total from the select expert?  If not can I write a formula with a command like "SHOW" when logic=1 and "SUPRESS" when logic=0
 
Thanks for your help
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Oct 2011 at 8:31am
it depends on your RT. if you are suppressing something based on the end result then no, if you are suppressing based on the value in that row then yes.
if you post sample row level data and grouping and what you want it to do (show/hide per reason) then I am guessing someone can give you a solution.


Edited by DBlank - 18 Oct 2011 at 8:31am
IP IP Logged
Ronny101
Newbie
Newbie


Joined: 12 Oct 2011
Location: Canada
Online Status: Offline
Posts: 18
Quote Ronny101 Replybullet Posted: 18 Oct 2011 at 8:37am
I am suppresing based on the value in that row, how can I do it?
Thanks again
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Oct 2011 at 9:00am
section expert
select details section (or group footer if that is your design)
suppress no drill down formula box (X-2 button)
add your boolean formula here
#RT>value
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Oct 2011 at 9:01am
you can have multiple conditions that evlauate as one TRUE or FALSE
e.g.
table.date>date and RT#>value
IP IP Logged
Ronny101
Newbie
Newbie


Joined: 12 Oct 2011
Location: Canada
Online Status: Offline
Posts: 18
Quote Ronny101 Replybullet Posted: 18 Oct 2011 at 9:47am
Thank you very much
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