Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record selection not working

Status
Not open for further replies.

busi1

Technical User
Dec 14, 2005
56
US
Hi,

I have 5 parameters
1) OwnerName
2) Offerings
3) from date
4) to date
5) status

All the parameters should be optional except from date and
to date.

These are the conditions how i select the parameters

1) name, from date and to date
2) offering, from date and to date
3) status, from date and to date
4) name , offering,from date and to date
5) name, status, from date and to date
6) offering, status, from date and to date
7) from date and to date

Here is the record selection formula i wrote.
Its works for some condition but not all

Its not working for
1) name, from date and to date
2) offering, from date and to date
3) status, from date and to date


{A.Org Class}<>"Mark" and
(if ({?Owner})="None" and ({?Offering})="None" and
({?Activity Status})="None" then
{A.BEGIN_DATE} in {?From} to {?To}
else
if {?Owner}="None" then
{A.Offerings}={?Offering} and
{A.Status}={?Status} and
{A.BEGIN_DATE} in {?From} to {?To}
else
if {?Offering}="None" then
{A.last name}={?Owner} and
{A.Status}={?Status} and
{A.BEGIN_DATE} in {?From} to {?To}
else
if {?Status}="None" then
{A.last name}={?Owner} and
{A.Offerings}={?Offering} and
{A.BEGIN_DATE} in {?From} to {?To}
else
{A.Status}={?Status} and
{A.last name}={?Owner} and
{A.Offerings}={?Offering} and
{A.BEGIN_DATE} in {?From} to {?To}
)

i am using crystal v 10.0 and oracle 9
can anyone help me out?
Thanks
 
If you are just trying to make them optional, then try:

{A.Org Class}<>"Mark" and
{A.BEGIN_DATE} in {?From} to {?To} and
(
if {?Owner}<> "None" then
{A.last name}={?Owner} else
if {?Owner}= "None" then
true
) and
(
if {?Offering} <> "None" then
{A.Offerings}={?Offering} else
if {?Offering} = "None" then
true
) and
(
if {?Status} <> "None" then
{A.Status}={?Status} else
if {?Status} = "None" then
true
)

Note that in your example you showed the parameter for status two different ways.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top