Question about SQL expression in Crystal Reports XI

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
jgerbitzAsked:
Who is Participating?
 
jgerbitzAuthor Commented:
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
 
mlmccCommented:
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
 
jgerbitzAuthor Commented:
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
 
mlmccCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.