Solved

Question about SQL expression in Crystal Reports XI

Posted on 2007-03-28
6
572 Views
Last Modified: 2012-06-27
Hi,

I'm trying to get a count of the number of records in my SQL Server 2000 db that meet certain criteria.  I have the following query:


(select count(*) as count from "PatientArrival"
where "PatientArrival"."PatientArrMechVentMetStatus" = '2')

It should return 3 records, but nothing is showing up in the textbox that I dragged the SQL Expression Field into.

Am I missing anything?

Thanks
0
Comment
Question by:jgerbitz
  • 2
  • 2
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 18812498
Unless you need to use Crystal syntax with { } around the field in the where clause.

ANother thought would be to use a name other than COUNT

mlmcc
0
 

Author Comment

by:jgerbitz
ID: 18817715
I tried the curly braces, but the editor didn't like them.
I removed "as count" as well.
Any other ideas?

Does it matter that I don't have any parameters asking for input when I preview the report?  I thought that without any parameters, the default would be to return _all_ records.
0
 

Accepted Solution

by:
jgerbitz earned 0 total points
ID: 18818172
Turns out it was an issue with the db connection.  Still not sure what it was, but I deleted the old report, created a new one which seems to have solved the problem.  The formula as I had it in my first post works fine.
Thanks for your help-
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18818324
jgerbitz - -What do you want to do with this question?  YOu can award points to experts who helped or I can close this for you and refund the points.

mlmcc
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

19 Experts available now in Live!

Get 1:1 Help Now