Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Remove multiple records on report Post Reply Post New Topic
<< Prev Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2012 at 8:59am

({EMPLOYEE.EMPLOYEEID}=next({EMPLOYEE.EMPLOYEEID}) and next({EMPLOYEE.Item_Changed}) = "Transferred into" and {EMPLOYEE.Item_Changed}="Transfer out of")

or
({EMPLOYEE.EMPLOYEEID}=previous({EMPLOYEE.EMPLOYEEID}) and previous({EMPLOYEE.Item_Changed}) = "Transferred out of" and {EMPLOYEE.Item_Changed}="Transfer into")


Edited by DBlank - 11 Oct 2012 at 8:59am
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 11 Oct 2012 at 9:19am
I tried both of these and I receive an error message that says "This field has no prevous or next value", and it points to {EMPLOYEE.Item_Changed} in both cases. Stumped! 
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2012 at 9:40am

Is your "item changed" some fomrula derviced text? or is it an actual db field?

if it is a db field repalce my {EMPLOYEE.Item_Changed} with the actual table and field name


Edited by DBlank - 11 Oct 2012 at 9:43am
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 11 Oct 2012 at 3:01pm
The "item changed" is a formula with an If then statement. I will paste it here:
If GroupName ({HRHISTORY.FLD_NBR})="New Hire Date" then GroupName ({HRHISTORY.FLD_NBR}) else
If GroupName ({HRHISTORY.FLD_NBR})="Bargaining Unit" and {@Item Changed}="FVMNATC" then "Transfer into FVMNATC" else "Transferred out of FVMNATC"
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Oct 2012 at 5:12am
This is difficult to assist when it is unclear what all of the grouping is. I assumed incorrectly that the sample data was at a detail level.
What I would suggest is to try and come up with a way that allows you to use summary options to come up with a text that you can display.
Since I do not know your actual data set and all the grouping you are doing all I can suggest is a approach.
If you are grouping on Employee at some upper group you could convert it ina few formulas
//new_hire_count
if {HRHISTORY.FLD_NBR}="New Hire Date"  then 1
when you sum this at any group level if the value is >0 then you know you had a row as new hire
do the same thing with your other types
so ultimately you can write a formula checking all of those values n a logical way
if sum(new hire count,group)>0 and sum(other formual,group)>0 then "text"
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 12 Oct 2012 at 5:30am
Thanks, I like this suggestion. I did not put the report together and frankly it's so complicated even the person who put it together can't comprehend how they did it. But this is a good suggestion. Should I have more questions, I will definitely post. Thanks!
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Oct 2012 at 6:37am
you can also use these values to exclude an entire group (employee) in the select expert group select statement
IP IP Logged
<< Prev Page  of 2
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.016 seconds.