Print Page | Close Window

Filtering a Field with multiple selections

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22535
Printed Date: 26 Apr 2024 at 11:03pm


Topic: Filtering a Field with multiple selections
Posted By: canonman11
Subject: Filtering a Field with multiple selections
Date Posted: 01 Feb 2018 at 9:04am
I have a field I am using that has multiple results within the field. I want to post a text result in the column if it sees one of the results listed.

I used the following formula in a new formula field and I see my result but I am also getting multiple lines put in the report now for each entry. I tried Suppressing duplicates and that did not work. Not sure where to go from here.

Formula used
IF({MGCOMP01.OPDESC}="PLATEMAKING") then
"Plated and Ready for Press"
Else
""

Also a note the field will not have a duplicate result in the OPDESC field it is a status field that will change as the order progresses for that order#. I just want a Text result to display when it sees the PLATEMAKING status.

Tim



Replies:
Posted By: hilfy
Date Posted: 14 Feb 2018 at 3:51am
There are a couple of things that you can try for this:

1. If you need all of the data, but just don't want to see duplicate details you could add an inner group on the formula (not the field!). Put your data in the group header, suppress the details and the group footer.

2. If you don't need the other data, go to the Select Expert and add {MGCOMP01.OPDESC}="PLATEMAKING" to the selection criteria. If you have an outer join to the MGCOMP01 table and you want to show other data, but only this detail line, you would change the formula to:

(
IsNull({MGCOMP01.OPDESC}) OR
{MGCOMP01.OPDESC}="PLATEMAKING"
)

This process will limit the data coming from the database and make the report run faster if you don't need all of the details.

3. For the section (Details, I assume), you could suppress the section based on whether or not {MGCOMP01.OPDESC}="PLATEMAKING". You'll be pulling more data into the report than you may need, but you'll only have the one row appear.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window