Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Record selection help - select certain values Post Reply Post New Topic
Author Message
louisville2k10
Groupie
Groupie
Avatar

Joined: 13 Sep 2010
Location: United States
Online Status: Offline
Posts: 45
Quote louisville2k10 Replybullet Topic: Record selection help - select certain values
     Posted: 06 Jan 2011 at 4:08am

I have a report with three types of data fields:

Date
Schema
Category
 
I want to select a date range but I only want a particular schema and category name to always be shown.
 
So, for an example, I want to select 12/5/10 to 12/6/10, I always want to see the schema name of "AcmeB" and "AcmeC," and Category names of "1," "2," "5," and "6."
 
I have created a startdate and enddate parameter and set
{datefield}>={startdate} and {datefield}<={enddate}, which works well.
 
Can somebody assist me? I think there should be a pretty simple answer to this that I'm overlooking.
 
Thank you.  
 
Thanks for your help!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 06 Jan 2011 at 4:13am
and {table.schema} in ["AcmeB","AcmeC"]
and {table.Category} in ["1", "2", "5", "6"]
 
HTH
IP IP Logged
louisville2k10
Groupie
Groupie
Avatar

Joined: 13 Sep 2010
Location: United States
Online Status: Offline
Posts: 45
Quote louisville2k10 Replybullet Posted: 06 Jan 2011 at 4:34am

A solution that ended up working for me was:

({Schema}="AcmeB" or {Schema}="AcmeC") and 
({Category}="1" or
{Category}="2" or
{Category}="5" or
{Category}="6")
and ({date}>={?StartDate}
and {date}<={?EndDate})
 
I hope this helps someone.
Thanks for your help!
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