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

Adding New SQL query to existing Crystal Report

Status
Not open for further replies.

PatelRam

Programmer
Aug 20, 2003
87
US
Hi,

I have an existing crystal report based on SQL query (Query1.qry). I want to add another query (Query2.qry) in that report so that I can link this two query to display column from Query2.qry in the report.

But the problem is when I am opening the existing current report, option "Add database to
Report","Remove from Report"and "Visual linking Expert" is disable.

My question is how can I add a new query to existing report?

Thanks,

Ram
 
Hi

yes you can add a second query but as for linking i'm not sure

cheers

pgtek
 
Thanks for reply

But I want to know how we can add new query to existing report?
 
ok
save this report to an other name first
then open the report and click on report then report expert
it will bring you the the beginning od the design of the report

hope this helps

pgtek
 
Hi,

I have saved the report to another name. Opened the report. I went to Report Expert.
But "Crystal SQL Query " option is disable. I mean all three "Database","Ceystal SQL Query"
and "Crystal Dictionary" option is disable. I don't know why..???

But I think, this way is not proper way of doing because even if this is working then all
my formating will go away as soon as i applied the changes. Because when I have selected
report expert,it prompt me
" Warning,On completion, report expert will replace your existing report defintion.....
......"

I need urgent help to solve this problem

Thanks...

Ram
 
Hi

that is wriight you will loose your fomat.
thats why i NEVER RECOMMEND USING CRYSTAL QUERY

Do you have that Query somewhere tha you can view it?

 
Yes I have crystal designer where I can view both the
query existing as well as new query.
 
Ok

now try to combine both query in to one
this the only way to do it beside re design the complet report sorry
when you have done so in the report click on databse ans verify database

good luck

pgtek

 
Ya, We can combine both the queries but to be honest with you this is not right way of doing it. I don't want to modify existing query because may be some other reports are based on this query1.qry so I don't want to take a chance.

I don't know is this limitation in crystal report 8.5..??

Thanks

Ram
 
Hi
My friend i have no other solution
I hate Crystal Query for that reason (garbage)

it's up to you
either you combine or re do the report

good luck

pgtek
 
QRY files are not designed to be linked, since you do all of you linking in the QRY. Why not create a second QRY that is the combination of the two that you have.

It isn't clear if you want to LINK the QRYs like linking tables, or if you want to append the results of one QRY to the and (a UNION query). Either way you should be able to write a single statement that returns your results and make that the QRY for this report.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top