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

SQL Expressions

Status
Not open for further replies.

peterb58

IS-IT--Management
Mar 20, 2005
110
I have seen references to SQL Expression fields and I suspect they may be very useful.
Question is, why do I not see an option for them on my reports? Do I have to enable something or is it dependant on the type of connection to the database?

I use ODBC to connect, but have not seen SQL Expressions in any of the options.

Pete

CRXI on Sybase 11
 
Are you using tables or a universe or are you writing commands to get the data for your report?

SQL Expressions are only available if you are selecting tables from the database and linking them together in Crystal. If this is what you're doing, you should see SQL Expressions as an option toward the bottom of the Field Explorer.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Hilfy

I just went back to basic and created a report step by step watching the SQL Expressions.

As soon as I add a Command, I lose the SQL Expressions. Unfortunately I have one of those in every report. I use it to provide me with an ALL option from a table.

At least I know the answer now.

thanks

Pete

 
You can create the equivalent of SQL expressions within a command (generally setting it up as a "field" in the Select clause)--it's just that when you use commands, you should be using them as your sole datasource, not linking them to other tables or other commands. However, you can use a second command to dynamically populate a picklist with an "All" option as long as you don't link to it or reference it in the main report.

I've also found that if I create a SQL expression first and use it in the report and then create a command, although the SQL expression will no longer appear in the field list, it will still operate within the report. Not sure this always works though.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top