[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How To Sub Query in Crystal Report 10

Posted on 2006-05-31
Medium Priority
Last Modified: 2008-11-10

I have this problem. I don't know Crystal Report very well but i need to make a query like this:

select * from People
where id in (select idpeople from Agency where cap=61100)

How can i translate this kind of query to sql ?
The "in" clause seems doesn't work with crystal report (it meens array).  


Question by:giovanelliale
1 Comment
LVL 28

Accepted Solution

bdreed35 earned 2000 total points
ID: 16799928
You can use a custom SQL statement as your report datasource if you use the Add Command option under the datasource connection.
You calso do this through a join in the rpeort.
Add both the People and Agency tables to your report in the Databse Expert.
Link the tables together on the ID field.
Close the Database Expert.
In the Select Expert, add criteria on the CAP field in the Agency table so that CAP = 61100.
You can now add any fields from either table to your report and get the results you want.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question