Create a New Standard Report. In 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 know it looks like a basic question. The problem is that after I open the .qry file and click the 'ADD' button in the data explorer, nothing happened. I couldn't add it to the Tables Avaliable listbox.
I had to create a new query file from scratch, and it works.
Sounds more like a problem with your query file. Or possibly you did not have a database connection. You weren't trying to add the query to a report with tables or another query already in the Tables Available, were you? You can't (or at least shouldn't) do that.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.