Solved

Question about SQL expression in Crystal Reports XI

Posted on 2007-03-28
6
577 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
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…

726 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