[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

Crystal Reports - Supress issue

Hello guys,
I have a Crystal Report with couple fields in it.
I have
1. Employee #
2. Empolyee Operation (has 3 operation - 1, 2 and 3)
3. Hours Worked on that day. (Hours)
Information in the 3 field keeps repeating (8 hours). Show that Opeartion 1 - 8 hurs, Operation 2- 8 hours and Operation 3 is 8 hours.
My question is: Is there a way to make a "Suppress if Duplicated" and don't add into TOTAL whatever was hidden.
I want to see that that person worked total of 8 hours for that day.
Please help me....
Thanks
0
Palmer_Admin
Asked:
Palmer_Admin
  • 5
  • 4
1 Solution
 
mlmccCommented:
Not sure what you are trying to do?

Can you give a sample data and what you want from the report?

What version of Crystal?

mlmcc
0
 
Palmer_AdminAuthor Commented:
e.g
Employee # - 123
Was working on 1/1/2007 on Operation 2, later on that day he was working on Operation 3
Employee 123 spent 8 hours on operation 20 on that day.
So what I see now is next to each operation Crystal is putting 8 hours.  In group footer when I do Sum it adds up to 16 hours. I want Ctystal to calculate it as 8 hours total.
I am running Crystal 8
0
 
mlmccCommented:
What data is available
Is it like this with multiple records for an employee or is there 1 record per day with multiple operattions and hours?

DATE  Operation  Hours  Employee #

mlmcc
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Palmer_AdminAuthor Commented:
This is my problem....

5
2
3
5 (invisible)
_________
total 15
but I need 10

regards
I know I need to create a formula, but I don't know how to do that, I think I need this formula:

create a formula field and compare it with previous field if same , assign as zero otherwise assign as normal.
then you can suppress if zero so that it will not displaY OUT .
for the sum you must sum up this formula field.
0
 
mlmccCommented:
It isn't the same as the previous field.

Can you sort the data?

mlmcc
0
 
Palmer_AdminAuthor Commented:
I am grouping my employee number
I have Emp #, Work Hours, date and Reported hours.
EMP 123
Work hours 3.5
Date: 10/19/2007
Reported hours 4
Utilization = 87.5%
EMP #| Work Hours| Date             |  Reported hours    | Utilization|
123    |  3.5               | 10/19/2007   | 4                            |
123    |  1.5               | 10/19/2007   | 4 (Suppress this )
123    |  .5               | 10/19/2007   | 2                            |

Total:     Work hours = 5.5 hours;   Reported: 6 hours;  It gives me Total Reported hours = 10 hours.
0
 
mlmccCommented:
So if the previous reported is the same suppress and don't add.

Create a formula in the report header
Name - DeclVars
WhilePrintingRecords;
Global NumberVar TotalReportedHours := 0;
''

In the group header
Name - ResetTotal
WhilePrintingRecords;
Global NumberVar TotalReportedHours;
TotalReportedHours := 0;
''

In the detail section where you want to dipslay the reported hours.  You can get rid of the suppression code
Name - CalcTotal
WhilePrintingRecords;
Global NumberVar TotalReportedHours;
If OnFirstRecord OR (Previous({ReportedhoursField}) = {ReportedhoursField}) then
(
    TotalReportedHours := TotalReportedHours + {ReportedhoursField};
    ToText({ReportedhoursField},0,'');
)
else
    ''

In the group footer where you want the total displayed
Name - DispTotal
WhilePrintingRecords;
Global NumberVar TotalReportedHours;
TotalReportedHours


mlmcc
0
 
Palmer_AdminAuthor Commented:
In the detail section where you want to dipslay the reported hours.  You can get rid of the suppression code
Name - CalcTotal
WhilePrintingRecords;
Global NumberVar TotalReportedHours;
If OnFirstRecord OR (Previous({ReportedhoursField}) = {ReportedhoursField}) then
(
    TotalReportedHours := TotalReportedHours + {ReportedhoursField};
    ToText({ReportedhoursField},0,'');
)
else
    ''
Error: The matching " for this string is missing - please advice....
0
 
mlmccCommented:
That is 2 ' not a double"

mlmcc
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now