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

Crystal Reports, can't get anything to appear in "Where" clause 1

Status
Not open for further replies.

ronhextall

Programmer
Jul 15, 2003
7
US
I am new at Crystal Reports so I am hoping I am not missing the boat too much with this.

I assumed the items I put in the seelct expert would generate a "where" clause based on what I enter. I was trying to use a parm but later stripped that out and cost coded a specific number to see if I could even get that in a "where" clause.

I am doing a simple report over a universe that has a single table in it (the table is actually a view). Once in the report I am using the select expert to pick a specific subset of data: {DWVCUSTOMEROVERVIEW_query.Custnumb} = 6745679.00

This works fine but I thought it would generate a "where" clause when I display the SQL via Database > Show SQL Query......

Why am I not getting a "where" clause in my SQL? Is it because the universe is over a "view" and not an actual table? Did I do something wrong in my "Select Expert"? Or do I have a flaw in my thinking?

Thanks.


 
I think it should have passed, too--as long as what you showed is actually what you entered.

-LB
 
When you're working with a universe, you need to put the selection criteria in the query definition that comes from the universe instead of in the Select Expert. Crystal won't modify the SQL that is built based on the universe. Instead, it will bring back all of the data and filter it in memory, which is why you're not seeing a where clause.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
If you want your selection critieria based on an inputted parameter that the user enters at run time are you basically SOL using a universe?

BTW, thanks for the reply.
 
hilfy--Thanks--that's good to know. I've never worked with a universe and assumed it worked more like a view.

-LB
 
When you are defining which fields from a universe to use, you also have the option of defining a Query Filter. Drag a field into the Query Filter section and the Filter Editor will appear. From there you can specify whether the the value is a constant, value(s) from a list, or a prompt. If you specify that it's a prompt, Crystal will prompt the user for a value at run time. When you define the filter this way, it WILL end up in the Where clause of the SQL.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top