Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Posted: 21 Nov 2007 at 3:08pm
Really there are a couple of ways. The one I use most often is creating a Command object and putting the SQL code in it. You can find them explained in the help file Search 'commands'.
You can also use SQL expressions but they seem to have a more limited application.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 21 Nov 2007 at 3:08pm
On the Data tab of the Database Expert dialog box, look for your data source and underneath it will be the Add Command node. Click on it to open a window where you type in your SQL statement. Save it and then you can use it on your report.
If you're looking for ways to optimize your reports with SQL Server, I have almost 40 pages of tips and tricks in Chapter 11, "Optimizing SQL Performance", of my CR Encyclopedia book.
Edited by BrianBischof - 21 Nov 2007 at 3:13pm
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum