Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2016 : Technical Questions
Message Icon Topic: Removing data from a report Post Reply Post New Topic
Author Message
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 18
Quote lowspark Replybullet Topic: Removing data from a report
    Posted: 06 Jan 2020 at 10:02am
I am looking to remove some of the data so that the report will not report on it. I have a data set with 5 departments 1-5. I do not want to report on departments 1 & 2 just 3-5. I have tried this:

1.Format Field > Common > Suppress
2 Formula: if {WORKORDER.WOCATEGORY}= "Departmet1" then true

This just removes the text of "Department1" but the report still reports the rest of the data. I would like it to not have any data for "Department1" at all. It is my understanding that you want the Formula to be true so that it does Suppress the Field. Any Help would be wonderful!
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1511
Quote kevlray Replybullet Posted: 06 Jan 2020 at 11:28am
Do you know about the Select Expert?  It provides a way to filter the report.
IP IP Logged
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 18
Quote lowspark Replybullet Posted: 06 Jan 2020 at 11:59am
I am unable to tell you why but when I use the selection expert, and only select out the departments that i want nothing, i can only do one department at a time.
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1511
Quote kevlray Replybullet Posted: 07 Jan 2020 at 4:21am
How are you forming the statement for the selection formula? Are you using a parameter? Or are you just putting a statement in the formula?
IP IP Logged
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 18
Quote lowspark Replybullet Posted: 07 Jan 2020 at 7:47am
{@Date} in {?Start Date:} to {?Finish Date:} and
{WORKORDER.WOCATEGORY} = "Department1" or {WORKORDER.WOCATEGORY}= "Department2"


This is what i have in my selection expert
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1511
Quote kevlray Replybullet Posted: 07 Jan 2020 at 8:15am
First off add some parenthesis to make it logically better
{@Date} in {?Start Date:} to {?Finish Date:} and (
{WORKORDER.WOCATEGORY} = "Department1" or {WORKORDER.WOCATEGORY}= "Department2")

Or you could do it this way.

{@Date} in {?Start Date:} to {?Finish Date:} and
{WORKORDER.WOCATEGORY} in ["Department1", "Department2"]
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.047 seconds.