Print Page | Close Window

Removing data from a report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22853
Printed Date: 16 Apr 2024 at 1:15am


Topic: Removing data from a report
Posted By: lowspark
Subject: Removing data from a report
Date 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.



Replies:
Posted By: kevlray
Date Posted: 06 Jan 2020 at 11:28am
Do you know about the Select Expert?  It provides a way to filter the report.


Posted By: lowspark
Date 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.


Posted By: kevlray
Date 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?


Posted By: lowspark
Date 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.


Posted By: kevlray
Date 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"]



Print Page | Close Window