Removing data from a report
Printed From: Crystal Reports Book — Forum Name: Technical Questions
Posted By: lowspark — 6 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!
Posted By: kevlray — 6 Jan 2020 at 11:28am
Do you know about the Select Expert? It provides a way to filter the report.
Posted By: lowspark — 6 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.
Posted By: kevlray — 7 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?
Posted By: lowspark — 7 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
Posted By: kevlray — 7 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"]
|