Print Page | Close Window

Data grouping/filtering

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=11094
Printed Date: 19 May 2024 at 3:27am


Topic: Data grouping/filtering
Posted By: Zuzanna
Subject: Data grouping/filtering
Date Posted: 10 Sep 2010 at 10:05am
I am a new Crystal 9 user.
I have a report grouped by employee number showing number of fields for each employee one of them being effective date. One of the employees appears twice on the report. All field values showing on the line are the same as his previous line except the effective date is different (that's why he appears on the report). I want to hide this row since all information except the effective date is the same. Can this be done and how?



Replies:
Posted By: DBlank
Date Posted: 10 Sep 2010 at 11:17am
you can conditionally suppress the detail row using a formula
Next(employeeid)=employeeID and NExt(datefield)<>datefield


Posted By: Zuzanna
Date Posted: 13 Sep 2010 at 5:52am
Thanks, I created the following statement
 

NOT((Next({SJ000174.EMPLID}) =  {SJ000174.EMPLID}  And

Next({SJ000174.LAST_NAME})  = {SJ000174.LAST_NAME} And

Next({SJ000174.FIRST_NAME}) = {SJ000174.FIRST_NAME} And

Next({SJ000174.NATIONAL_ID}) = {SJ000174.NATIONAL_ID}  And

Next({SJ000174.LHS_DEPT_DESCR}) = {SJ000174.LHS_DEPT_DESCR} And

Next({SJ000174.LOCATION}) = {SJ000174.LOCATION} And

Next({SJ000174.REG_TEMP}) = {SJ000174.REG_TEMP}  And

Next({SJ000174.FULL_PART_TIME}) = {SJ000174.FULL_PART_TIME} And

Next({SJ000174.LHS_CONTRACT_DESCR}) ={SJ000174.LHS_CONTRACT_DESCR} And

Next({@POSITION TITLE}) = {@POSITION TITLE} And

Next({SJ000174.BUSINESS_UNIT}) = {SJ000174.BUSINESS_UNIT} And

Next({SJ000174.DEPTID}) = {SJ000174.DEPTID} And

Next({SJ000174.UNION_CD}) = {SJ000174.UNION_CD})

I am trying to select only rows where any of the field values are different. If all values are the same, exclude the row from the report. Being new to Crystal, I don't know how to set up the Selection Expert with this statement.

 



Posted By: DBlank
Date Posted: 13 Sep 2010 at 6:11am
you cannot use this in the select expert as NEXT() function runs after the data is selected. You can use it do to conditional suppression of the detail section.
In the section expert, select the detail section and click on the formul button nect to the suppress no drill down option.
Insert your formula there but get rid of your leading NOT as this suppresses based on a TRUE return from your formula so you want it to suppress when all those items are equal.


Posted By: godwing
Date Posted: 13 Sep 2010 at 5:28pm
Hi,

You may try to check your link fields. Incorrect link fields will result in duplicating fields.

regards,


Posted By: Zuzanna
Date Posted: 21 Sep 2010 at 7:05am
Thanks so much it worked. If you could look at my other Grouping problems I logged. I would greatly appreciate it.l


Posted By: godwing
Date Posted: 26 Sep 2010 at 9:27pm
Hi,

May I know what's your main objective here?

thanks,


Posted By: Zuzanna
Date Posted: 27 Sep 2010 at 3:40am
To eliminate duplicate rows from the report, where all field values except the eff date are the same.
Background info - I created a PeopleSoft query to select everyone who had a change of data on the name record. The user wants to see previous and new changed data on the crystal report. When the user enters the changes, they insert a new row with a new eff date. The name record  includes other fields beside the ones I am selecting. I hope this answers your question.



Print Page | Close Window