Solved

Adding SQL database queries to a Crystal report

Posted on 2008-10-06
3
200 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
  • 2
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 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 100

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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. …
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now