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

writing queries

Status
Not open for further replies.

IainK

Programmer
Jul 27, 2001
26
NO
I have a set of sql queries that were written for microsoft excel. I want to use these same queries inside a crystal report - but when I copy/paste the query into the 'sql expression editor' it finds errors.

I have cpy/pasted the exact same query into Crystal SQL Designer - and it worked fine.

How can I use this query to get and siplay the data inside a Crystal Report?

Cheers,

- Iain
 
You can't paste SQL into CR Report designer. You can paste it into the SQL designer and save it as a QRY. Then you can run a report against the QRY file. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Cheers Ken,

I'm trying to do as you suggested and run a report against the qry file I saved. I am doing the following and having some problems.

1) Create new report - *Standard*
2) 'Standard Report Designer' - select *query*
3) 'File Open' - select the qry file - click *open*
4) 'Choose new location' - when I click *openÆ here nothing happens.

Am I going about this the right way or should I be doing it differently?

Cheers much,

- Iain
 
I don't recognize step 4?

AFter step 3 you should get the word 'query' on the data tab, and then you should be able to go to the fields tab and select fields from the QRY. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
After selecting 'query' in the 'standrd report expert' I get a 'file open' window to select my .sql file as I described in my last post. However, after selecting it and clicking 'open' I still get a new window popping up immedietly, as described in 'step 4'.

Any idea why this might be happening? Any suggestions on how to get around it?

Cheers,

- Iain
 
Your file should not be a .SQL file, but a .QRY file. It has to be created with the CR SQL designer. Paste your SQL into the the SQL designer and save it as a QRY file. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
I have pasted my sql into CR SQL designer and saved it as a QRY file - however I am still having the same problem.

- Iain
 
Can you process this QRY while in the SQL designer, and have it preview the results? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top