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

SQL Expression - Missing after Crafting a SQL command 1

Status
Not open for further replies.

beanNut

IS-IT--Management
Jun 2, 2004
28
US
I crafted a simple report using a SQL Command. This is where you create a sql command and can use input parameters.
Once I save the report, the command now appears under the database tab with the variables that I specified. Fine, this is expected. Now I noticed that SQL Expression Group is missing. This is on the left of the IDE window and all that shows now are Database Fields (command), formula fields, parameter fields, running total fields, special fields. WHAT happen to the SQL expression?

Secondly, Is there a way to name the command? Must it always be Command.

Thirdly, Looks like it can only have one command per report.
Why?

Thanks in advance for Your help.
 
It's been a long day, and several hours since my last cup of coffee, so excuse my rambling...

1) Commands are sort of like stored procedures, in that they're treated like prepared SQL statements. When SQL Expressions are created, they become part of the SELECT statement (do a 'Show SQL Query' in a report that's using one and you'll see this). A stored procedure isn't a SELECT statement, so Crystal can't tack the SQL Expression on to the query - hence it being disabled/not visible.

2) To rename a Command, go to Database > Database Expert > click 'Command' > hit F2 > rename the Command

3) You can indeed have more than one Command in a report, and you can link them as well - something you can't do with stored procedures. From the Database Expert, use the 'Add Command' again to add more.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top