Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to use WHERE clause in Formula. Pls Help Post Reply Post New Topic
Author Message
theitvideos
Newbie
Newbie
Avatar

Joined: 15 Feb 2011
Location: Australia
Online Status: Offline
Posts: 5
Quote theitvideos Replybullet Topic: How to use WHERE clause in Formula. Pls Help
     Posted: 15 Mar 2011 at 10:02pm
I am using Forumulas in Crystal Reports and it has to count the total number of values for specific zones.

In SQL Server I could simply write:

Select count(*) from MyTable WHERE MyZone IN ('HH','YW', 'GWB', 'SVT')

Now for Crystal Reports, how do I use this query to run in Formulas that will give me the count of these zones.

Please reply.

Thank you! :)
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 16 Mar 2011 at 3:18am
You can use a running total, summarize type = "Count", and evaluation would be a custom formula you define that says

MyTable.MyZone in ['HH', "YW", "GWB", "SVT"]

Then place it in the report footer.

Edited by Keikoku - 16 Mar 2011 at 3:19am
IP IP Logged
Gnibmilc
Newbie
Newbie


Joined: 26 Sep 2011
Online Status: Offline
Posts: 8
Quote Gnibmilc Replybullet Posted: 26 Sep 2011 at 7:02am
I am using Crystal 2008 and am also having trouble with my WHERE clause. It seems that Crystal does not recognize the WHERE clause as a clause at all. Any suggestions?
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