Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Crystal Report wont display Oracle SQL query Post Reply Post New Topic
Author Message
Ronni_Mazza
Newbie
Newbie


Joined: 17 Apr 2012
Location: Australia
Online Status: Offline
Posts: 3
Quote Ronni_Mazza Replybullet Topic: Crystal Report wont display Oracle SQL query
     Posted: 17 Apr 2012 at 1:50pm
Good Day all,
 
I am trying to display a count of products from a oracle database
 
select count (active) from PRODUCT_REPOSITORY where active = 1
 
I have tested this query on the SQL developer with success, and i have other similar queries that work. For some reason this one just displays 0. I know it should display 21000 ish as the result
 
The SQL statements pass in Crystal fine, no errors.
 
This has me stumped.
 
Why is it showing 0? It seems to connect to the databse as other queries that use the same connection have results come up.
 
Any help would be great
 
Using CR 11.0.0.1282 with oracle 10g
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 18 Apr 2012 at 3:37am
since I don't use sql in the reports themselves, are you calling this from a command object, or from inside the actual report?
 
have you tried aliasing your output, since count(*) isn't a name that you can use...usually it gets replaced with something like 'expression1000'
 
try...just for fun
select activeCount = count(active) from ....
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum