Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Data filtering in Crystal Report Formula Post Reply Post New Topic
Author Message
athar mehar
Newbie
Newbie


Joined: 15 Mar 2013
Location: United States
Online Status: Offline
Posts: 7
Quote athar mehar Replybullet Topic: Data filtering in Crystal Report Formula
    Posted: 06 Feb 2014 at 11:35am
Hi Experts,

I have a crystal report in crystal report 2011 version 14.0.7.1147 RTM and back end database is MS SQL Server 2008.

The report gets the data from a stored procedure.
The problem is that I need to count a names filed and exclude certain names in that count but at the same time I need to show all names without any exclusion on the same report as well. So I don’t think so the select expert can help me here because that will totally exclude these names from the report.
So is there any way that I can show these names in the report but in the formula itself I can exclude them form the calculation.
For example:
I want to apply some kind of filer in the formula itself to exclude these values.
{Fieldname1} <> 0.00 and {Fieldname2} <> ‘No Person Designated’
I want to count and sum the rest of the rows excluding the rows in the above condition.
E.g. Count ({Fieldname3}) where {Fieldname1} <> 0.00 and {Fieldname2} <> ‘No Person Designated’

I hope it makes sense.

Thanks in advance
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 Feb 2014 at 5:15am
sure. Shared variables. Usually they come in groups of 3: reset, increment, and display

reset: usually a group header
shared numbervar x:=0;
""//will hide the zero from displaying on the report

increment: usually in the detail
shared numbervar x;

if y then x:=x+1; //or whatever logic you need
""//again will hide the running total (remove for debugging)

display: usually a group footer
shared numbervar x

HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.