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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Params to two fields

Status
Not open for further replies.

boniblue

Programmer
Jun 27, 2006
10
US
Hello!
I am using Crystal 9 with SQL Server...
I have a report with a parameter that selects data based on user selection of "ALL" or of five counters...one which pulls from one table and the other four are pulled from another table...these tables are set up exactly alike (down to column names) they just run at different intervals...
Can anyone help me set up my select statement so that it selects on this parameter? Right now if I select "ALL" it does display all counters but if I select any (one or more)of the counters individually through the param it doesn't give me any data...
Here is my code that I have inserted into the select expert:

Code:
({?Counter} = "ALL" or {@Counter Name} = {?Counter} and  {@Counter Name 1} = {?Counter})

{?Counter} = parameter to select counter
{@Counter Name} = counter name from 1st table
{@Counter Name 1} = counter name from 2nd table

Thank you for your time and consideration!
Boni
:eek:)
 
Why are you using formulas instead of the fields themselves, and what's in them? Describing them takes as long as just showing what's in them...

You don't speak of the relationship between the tables either.

It sounds like you should be using a UNION ALL in a query and using that as the datasource, hard to know from this.

-k
 
Thank you synapsevampire for your attention to this matter...I have myself so turned around I think it is time to scrap it and start over...
But thank you again for trying to help me!
BoniBlue
:eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top