If I understand the question correctly you want to actually get the report to run 2 select statements ? The first statement is the report datasource and you want to retrieve an unrelated field using the 2nd SQL statement.
If I am correct the easiest way to accomplish this is to insert a subreport and use this to return the unrelated data.
Gary
Main Topics
Browse All Topics





by: bdreed35Posted on 2005-01-28 at 05:32:20ID: 13162825
Can you write SQL yourself or are you looking for guidance on how to write it?
If you know how to write SQL and you are looking for information on where you can use it in your report then I can tell you about the SQL Command functionality.
Under the Database menu, select the Database Expert.
Establish a connection to your datasource.
Under that connection, the first option should be "Add Command".
Double Click it to add it and open the Command dialog box.
In the Command dialog box, you can paste SQL statements to use as the basis of you report. Once you click OK, Crystal will check that the SQL will be accepted by your db.
If it is valid, you are all set, if not, you will need to correct any problems. The errors aren't very good so I would test the SQL using a database specific SQL tool.
If you need to go back and edit the SQL later, just go back into the Database Expert, and right click the right side where it says Command, and choose Edit Command.