Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: SQL query change in 10.2 w 2005 Post Reply Post New Topic
Author Message
ronhawker
Newbie
Newbie


Joined: 13 Apr 2007
Location: United States
Online Status: Offline
Posts: 2
Quote ronhawker Replybullet Topic: SQL query change in 10.2 w 2005
    Posted: 13 Apr 2007 at 9:59am
How do you change a sql query in a report without re-doing the report. Using 10.2 with Visual Studio Pro 2005. You can show sql query but I don't see how to change without starting over. I also tried to base a report on a sql view(query) but it seemed not to pickup all the elements of the view like multiple by order parameters.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 13 Apr 2007 at 10:04am
Depending on the database, you may be able to set the CommandText and use that in place of the tables from the Database Expert.  CommandText is one or more SQL queries.  If you're Crystal allows this for your database, you'll see "Add CommandText" just below the name of your database connection after you've opened the connection.
 
As for the order by, do you have groups and/or sorts in you report.  If so, they will override any order that's used in the view.
 
-Dell
IP IP Logged
ronhawker
Newbie
Newbie


Joined: 13 Apr 2007
Location: United States
Online Status: Offline
Posts: 2
Quote ronhawker Replybullet Posted: 13 Apr 2007 at 11:18am
We are using MSSQL 2005. I'll try the command text route. I am using Groups. It is a company directory based on a SQL table and the grouping is by store, which we have 31 of them. The order would be within the store group; department, display order, name where you could force a name high like a manager of a department by setting a display order that overrides the alpha name sort. 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 16 Apr 2007 at 6:33am
You probably also should try setting the sorts in Crystal (they don't have to be groups!) as that will make sure that the sorts happen.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.016 seconds.