Solved

Adding SQL database queries to a Crystal report

Posted on 2008-10-06
3
207 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

751 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