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

Crystal 7.0 will not allow selection of .qry

Status
Not open for further replies.
Oct 18, 2001
16
US
I have created a .qry file (it works) and want to use it in a report. When I create a new report and specify the Query option, I am prompted for the .qry file.

When I select the .qry I want, another dialog box opens prompting me to "Choose New Location". If I choose a new location or cancel out of the query, then the .qry is not added as the data source for the report.

Any suggestions on how I get around this?
 
When you select the Crystal SQL Query button in the Standard Report Expert, you should see the Data Explorer dialog. Expand the Query/Metadata node and click on Crystal SQL Query Files.

You should get a "File Open" common dialog box. Navigate to the folder where your .qry file is (preferably, this should be the same folder where you will save your .rpt file). Select your .qry file and click the "Open" button. This closes the common dialog.

Back in the Data Explorer, your .qry file should now be appended to the Crystal SQL Query Files node. Select it and click the "Add" button. You may be prompted here to connect to the database your .qry file uses, if you are not already logged in. Do that. Now, click the "Close" button of the Data Explorer.

You are now back in the Standard Report Expert. The Tables Available listbox should show the word "Query". Do NOT try to add tables or other queries to this list - a query report cannot link to other data sources.

Click the Fields tab. The Available Fields listbox shows your query and its fields. From here on, design your report just as you would with a table-based report.

(I have been creating a new query-based report as I write this reply and am desribing what I see on my screen. I have done a lot of query-based reports this way. I am using Crystal 8.5 and a DB2 database. Note that the Crystal Query Designer uses ODBC database access.)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top