Link to home
Start Free TrialLog in
Avatar of jgerbitz
jgerbitzFlag for Canada

asked on

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
Avatar of Mike McCracken
Mike McCracken

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
Avatar of jgerbitz

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of jgerbitz
jgerbitz
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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