Print Page | Close Window

Group problem please help

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=11463
Printed Date: 18 May 2024 at 10:51pm


Topic: Group problem please help
Posted By: Zuzanna
Subject: Group problem please help
Date Posted: 19 Oct 2010 at 11:04am

Hi,

I hope someone can help. I have a report grouped by EmplId and Ded Code.

The detail records coming in are similar to the following:

EmplId   Ded Code  PayEnd Dt       EmplyeContr  EmplyrContr  #Times

1010      S100        2010/09/09           0.0                25.00               4

1010      S100        2010/09/09        10.00                 0.0                 4

1010      S100        2010/09/16           0.0                25.00               4

1010      S100        2010/09/16        10.00                 0.0                 4

1010      S100          1900/01/01        0.0                   0.0                0

1010      S200        2010/09/09           0.0                25.00               3

1010      S200        2010/09/09        10.00                 0.0                 3

1010      S200        2010/09/16           0.0                25.00               3

1010      S200        2010/09/16        10.00                 0.0                 3

1010      S200        1900/01/01          0.0                   0.0                 0

 

I need to calculate the #Times Remaining so my group report by Emplid/Ded Code looks as follows

 

EmplId   Ded Code  EmplyeContr  EmplyrContr  #Times  #TimeRemain

1010      S100           10.0                25.00               4               2

1010      S200           10.0                25.00               3               1

 

 I don’t want to include the row with 1900/01/01 in my formula.  These rows are from another record and contain Comp Rate that I need for calculation.l The rows with PayEndDt  2010/09/09 and 2010/09/16 are from the pay and I need them in calculating #TimeRemain.

I created a field formula

{SJ000147.NBR_TIMES} – (DistinctCount({@Payend_Date, @Ded_Code})

 

Formula @Payend_Date

  If {SJ000147.Payend_Dt} > cdate(‘1900/01/01’)

  Then totext({SJ000147.Payend_Dt

   Else ‘’

I am not getting the correct results.
Thanks in advance.



Print Page | Close Window