Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Fórmula Post Reply Post New Topic
Page  of 2 Next >>
Author Message
carine
Newbie
Newbie


Joined: 27 Jun 2013
Location: Brazil
Online Status: Offline
Posts: 14
Quote carine Replybullet Topic: Fórmula
    Posted: 08 Aug 2013 at 4:51am
Good morning!

I need your help.

I have a list relatótrio that manages employee and every manager and dates of absences of employees
Group 1: Managers.
Group 2: Employees.

Put the sum of faults of each group of employees. Only when an employee has group manages more than 3 absences the group manages the field "Quantity lapsed" = 1.

example:

 Data            
missing
-------------------------------------------------- ---------------------------
Group 1: Department Manages
Group 2: Luiz

05/07/2013        0
06/07/2013        1
07/07/2013        1
08/07/2013        0

Sum total fault: 2

Group 1: Department Manages
Group 2: Luiz

05/07/2013        1
06/07/2013        1
07/07/2013        1
08/07/2013        1

Sum total fault: 4

Grand total = 6         Fouls employee with more than 3 absences = 1

How would this formula to add only the employees who have more than 3 absences?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 08 Aug 2013 at 5:03am
shared variable:
group header 2:
shared numbervar absence:=0;
"" //hide the zero

detail:
shared numbervar absence;
if fault then absence := absence + 1; //i don't know what makes a fault
""//hide the increasing number

group footer 2:
shared numbervar totAbsence;
shared numbervar absence;
if absence >= 3 then totAbsence := totAbsence + 1;
"" // hide the incrementing total

grand total display:
shared numbervar totAbsence

HTH
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Aug 2013 at 6:06am
if i understand your question you might also consider using the built in Running Total feature.
field to summarize=employee
type= distinctcount
evalaute = use a formula
sum(absent,employee)>3
reset=never
place in report footer
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 08 Aug 2013 at 7:31am
ahh...there you go with those running totals ;)
one of these days I'll master them
IP IP Logged
carine
Newbie
Newbie


Joined: 27 Jun 2013
Location: Brazil
Online Status: Offline
Posts: 14
Quote carine Replybullet Posted: 08 Aug 2013 at 10:42am
Tested this beauty there.

But what I exactly want is for him to show me that total by group and at the end show the grand total.

As it stands it just brings the grand total.

How would I do?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 08 Aug 2013 at 10:44am
probably 2 running totals, one as is...grand total.
the other would reset every group...place in the group footer.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Aug 2013 at 10:46am
yep
IP IP Logged
carine
Newbie
Newbie


Joined: 27 Jun 2013
Location: Brazil
Online Status: Offline
Posts: 14
Quote carine Replybullet Posted: 08 Aug 2013 at 10:54am
não sei como fazer.  =(

Poderia fazer o passo a passo como você fez anteriormente?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Aug 2013 at 10:58am
field to summarize=employee
type= distinctcount
evalaute = use a formula
sum(absent,employee)>3
reset= on group - select group 1
place in Group 1 footer
IP IP Logged
carine
Newbie
Newbie


Joined: 27 Jun 2013
Location: Brazil
Online Status: Offline
Posts: 14
Quote carine Replybullet Posted: 09 Aug 2013 at 4:55am
I still can not do.

I would have to create the same formulas?
------
shared variable:
group 2 header:
shared absence numbervar: = 0;
"" / / Hide the zero

detail:
shared numbervar absence;
then if fault absence: absence = + 1 / / i do not know what makes the fault
"" / / hide the Increasing number

group 2 footer:
shared numbervar totAbsence;
shared numbervar absence;
if absence> = 3 then totAbsence: totAbsence + = 1;
"" / / Hide the full incrementing

grand full display:
shared numbervar totAbsence
-----

  and only change the positioning of the formula "grand full display:
shared numbervar totAbsence "putting her in group 1?
IP IP Logged
Page  of 2 Next >>
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.031 seconds.