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!

SQL Expression Builder

Status
Not open for further replies.

2J

Programmer
Nov 23, 1999
8
AU
Is anyone familiar with the expression builder in Crystal Reports Designer? Can I use this to create regular SQL statements of the form SELECT FROM WHERE ORDER BY<br>

<br>

If you have used this feature before could you please provide and example showing exactly how to use this with the exact syntax. I haven't been able to get it to work and I haven't found much information in the help files]<br>

<br>

Thanks<br>

2J
 
The following uses the Craze Sample Data that installs as a default with CR as the data source:<br>
SELECT <br>
Customer.`Customer ID`, <br>
Customer.`Customer Credit ID`, <br>
Customer.`Customer Name`<br>
FROM <br>
`Customer` Customer<br>
WHERE <br>
Customer.`Customer ID` &lt; 5<br>
ORDER BY <br>
Customer.`Customer ID` ASC <br>
Your SQL is basically limited to what your data source/driver supports, including parameters, set operators, summaries, etc. It is an alternative to creating a stored procedure.<br>
One thing that tripped me up was that to use the resulting SQL Query file as a data source in a report you must create the report using the report expert in order to have the option of using a SQL Query file as a option for a data source. <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
Malcom,
Are you speaking of the Crystal SQL Designer or the SQL Expression Editor?
Am am as green a Crystal user as there is and I have been struggling with how to create some fairly complex SQL (correlated queries) for use in Crystal....

Nik Rende
Maine State Legislature
 
2J,

What Malcolm is describing is the SQL Designer. What I think you are referring to is the SQL Expression editor within Crystal Reports.

The SQL Expression Editor does NOT allow you to add SQL Statements as you have discovered. It only allows you to add a column to your results table by using an expression containing SQL functions. The available functions are in the function list. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top