Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Adding SQL database queries to a Crystal report

Posted on 2008-10-06
3
Medium Priority
?
212 Views
Last Modified: 2012-05-05
Hello,

I'm working on some maintenance of a Crystal report that was built with a html front end.

I'd like to make my addition by adding a sql query to the report file itself and not have to do any work with the html feed of data into the report file if possible.

Does Crystal have a good way that I can use the ODBC data source the report already uses and add a SQL query that I can store the result in a formula I create within the report or am I simplifying this too much??

Thanks,
JMO9966
0
Comment
Question by:JMO9966
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 750 total points
ID: 22652001
Crystal can only use a single query as the data source.

You could use a subreport and pass the information to the main report using shared variables.

If the main report is using a SQL database you may also be able to use a SQL Expression in a formula to get the value.  A SQL Expression can only return a single value.

mlmcc
0
 

Author Comment

by:JMO9966
ID: 22653387
Thanks mlmcc,

I also need to pass values from the report into my sql query.  What are your thoughts on that?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 22654676
If you use it as the source of a subreport you can pass aprameters to the query.

You can also use the seelct expert to filter the data for the subreport.

You can also use the SQL expression with data in the report as filters.

mlmcc
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

730 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