Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grouping Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Zuzanna
Groupie
Groupie


Joined: 10 Sep 2010
Location: Canada
Online Status: Offline
Posts: 56
Quote Zuzanna Replybullet Topic: Grouping
    Posted: 18 Sep 2010 at 5:57am
I have A  report grouped by deduction code(S100). The detail data looks similar to the following:
EmplId   Ded Code  PayEnd Dt       EmplyeContr  EmplyrContr  DedType
1010      S100        2010/09/09    0.0                25.00            2
1010      S100        2010/09/09    10.00            0.0                1
1010      S100        2010/10/09    0.0                25.00            2
1010      S100        2010/10/09    10.00            0.0                1
 
The user wants to see the last/highest PayEnd Dt Employee and Employer Contribution.
ie.
1010     S100     10.00    25.00
 
I put the detail field({SJ000146.LHS_DED_EMPLYE_SHR} and {SJ000146.LHS_DED_EMPLYR_SHR} on the group line and I when I run the report I see
 
1010     S100     10.00   0.0
 
I set up the following formula, but it doesn't work, the Employer Share gets overwritten by the last row:
If {SJ000146.LHS_DED_TYPE} = '2' Then 
If {SJ000146.LHS_DED_EMPLYR_SHR} > 0 Then
{SJ000146.LHS_DED_EMPLYR_SHR}
I still see the following when I run the report
 
1010     S100     10.00   0.0
 
How do I save off the Employer Contribution, so it shows on the report (global variable ?).
 
Thanks in advance.
IP IP Logged
Senthil Raj
Newbie
Newbie
Avatar

Joined: 02 Aug 2010
Location: India
Online Status: Offline
Posts: 27
Quote Senthil Raj Replybullet Posted: 19 Sep 2010 at 9:16pm
if you directly put the detail fields in the group line it will show you the last record fetched...

so you use maximum of EmplyeContr and EmplyrCont in the group line(footer)
Live And Let Live...
IP IP Logged
Zuzanna
Groupie
Groupie


Joined: 10 Sep 2010
Location: Canada
Online Status: Offline
Posts: 56
Quote Zuzanna Replybullet Posted: 20 Sep 2010 at 2:34am
The last record fetched has 0.0 in the Employer contribution.
IP IP Logged
Senthil Raj
Newbie
Newbie
Avatar

Joined: 02 Aug 2010
Location: India
Online Status: Offline
Posts: 27
Quote Senthil Raj Replybullet Posted: 20 Sep 2010 at 6:52pm
that's right

use maximum of EmplyeContr and EmplyrCont in the group line(footer)
Live And Let Live...
IP IP Logged
Zuzanna
Groupie
Groupie


Joined: 10 Sep 2010
Location: Canada
Online Status: Offline
Posts: 56
Quote Zuzanna Replybullet Posted: 21 Sep 2010 at 3:46am
I have a group on the ded code within that are rows with different Pay End date. I need to see the EmplyeContr and EmplyrCont from the last/highest Pay End date. It is not necessary the maximum one. Other totals are summarized by the ded code.
EmplId   Ded Code  PayEnd Dt       EmplyeContr  EmplyrContr  DedType
1010      S100        2010/09/09    0.0                25.00            2
1010      S100        2010/09/09    15.00            0.0                1
1010      S100        2010/10/09    0.0                15.00            2
1010      S100        2010/10/09    10.00            0.0                1
 
Sorry, I just noticed that on the report that it could be different.
 
I created 2 formulas, first one in the detail
Global NumberVar ER_Share;
If {SJ000146.LHS_DED_TYPE} = '2' Then 
If {SJ000146.LHS_DED_EMPLYR_SHR} > 0 Then
ER_Share := {SJ000146.LHS_DED_EMPLYR_SHR};
 
Second one in the ded code group
Global NumberVar ER_Share;
ER_Share;
 
I still get 0.0 in EmplyrContr.


Edited by Zuzanna - 21 Sep 2010 at 4:25am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Sep 2010 at 11:50am
SInce you requested help on this from the other post...
If I understand you correctly, Senthil was giving you good feebback.
I assume you want this per employee and also per deduction type
You need top grroup on Deduction type then on EMployee ID
in the group footer 2 (employee id level) you need to use 2 different formulas to show the 2 values
Maximum(EmplyeContr,emplID)
MAXIMUM(EmplyrContr,emplid)
 
Is this what you are trying to do?
IP IP Logged
Zuzanna
Groupie
Groupie


Joined: 10 Sep 2010
Location: Canada
Online Status: Offline
Posts: 56
Quote Zuzanna Replybullet Posted: 22 Sep 2010 at 2:39am

Hi,

yes I am grouping on EmplId and Ded Type. The user wants to see the EE and ER contributions from the highest Pay End Date on the Ded Type  group level. The maximum worked, but gave me the highest contribution within the Ded Type group instead of the contribution from the highest Pay End Date within one Ded Type group. I've been having trouble with the formulas, so please help. ie from the following

EmplId   Ded Code  PayEnd Dt       EmplyeContr  EmplyrContr  DedType
1010      S100        2010/09/09    0.0                25.00            2
1010      S100        2010/09/09    15.00            0.0                1
1010      S100        2010/10/09    0.0                15.00            2
1010      S100        2010/10/09    10.00            0.0                1
 
I need to see on the S100 group lebel EE contr 10.00 and ER contr 15.00
Thanks ! 


Edited by Zuzanna - 22 Sep 2010 at 3:02am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Sep 2010 at 4:30am
Ahhh, you need it to be the value from the maximum date not just the maximum value of the group.
try a Running Total
name=EE
field to summarize=EmplyeContr
Type=MAximum
Evaluate=Use a formula
MAXIMUM(PayEndDt,EmplId)=PayENdDt
Reset=Group level 2 (EmplID)
Place on group footer 2
 
repeat for the othe rbu change the field to summarize
 
name=ER
field to summarize=EmplyrContr
Type=MAximum
Evaluate=Use a formula
MAXIMUM(PayEndDt,EmplId)=PayENdDt
Reset=Group level 2 (EmplID)
Place on group footer 2
 
 
 
IP IP Logged
Zuzanna
Groupie
Groupie


Joined: 10 Sep 2010
Location: Canada
Online Status: Offline
Posts: 56
Quote Zuzanna Replybullet Posted: 22 Sep 2010 at 10:26am
Thanks, it worked ! You're the best.
IP IP Logged
Zuzanna
Groupie
Groupie


Joined: 10 Sep 2010
Location: Canada
Online Status: Offline
Posts: 56
Quote Zuzanna Replybullet Posted: 23 Sep 2010 at 10:33am
Hi,
I had a request for additional change to my report. The user wants to show Current Ded summ on the report. The rows can also come in the following sequence ie.
 

EmplId   Ded Cd  PayEnd Dt    EmplyeContr  EmplyrContr  Curr Ded DedType

1010      S100      2010/09/09    0.0                25.00            10.00    2

1010      S100      2010/10/09    0.0                15.00            12.00    2

1010      S100      2010/09/09    15.00             0.0               10.00    1

1010      S100      2010/10/09    10.00            0.0                  8.00    1

 

I need to see on the S100 Ded Cd group level EE contr 10.00 and ER contr 15.00 (this works great) and

new request - Curr Ded 20.00 ( summ of 12.00(from highest PayEnd Date Ded Type 2) + 8.00(from highest PayEnd Date Ded Type 1)
 
Thanks in advance.
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.