Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Question about SQL expression in Crystal Reports XI

Posted on 2007-03-28
6
Medium Priority
?
582 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 101

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 101

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

618 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