Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: First and Last Date in a Week Post Reply Post New Topic
Author Message
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Topic: First and Last Date in a Week
    Posted: 12 Jul 2012 at 3:06am
Hello,
  I have created a formula to calculate payroll hrs:
(DatePart("ww",{BAQReportResult.LaborHed.PayrollDate},crMonday)
 
I then grouped then for each week to give me total hrs for each week, but the grouping is as follow: (week 3, week 4, week 5 etc),
Is there anyway to add the beginning date and ending date next to each group. so i would want to see something like (Week 3- 01/18/2012 - 01/25/2012)
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 Jul 2012 at 3:55am
2 methods come to mind:
1) add the date and date + 6 to the formula (since it really won't change the outcome)
2) add another level below the current one based on date and display there (suppress the current header)
 
adding the date should be something like:
(DatePart("ww",{BAQReportResult.LaborHed.PayrollDate},crMonday) + " - " + totext({BAQReportResult.LaborHed.PayrollDate}, "MM/dd/yyyy") + " - " + totext(dateAdd("d", 6, {BAQReportResult.LaborHed.PayrollDate}), "MM/dd/yyyy")
 
HTH
 
 
IP IP Logged
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Posted: 12 Jul 2012 at 4:43am
thanks. it sort of worked. when i used this formula i got this:
Week 23 - 06/04/2012 - 06/11/2012
Week 24 - 06/05/2012 - 06/12/2012
Week 25 - 06/06/2012 - 06/13/2012
 
It would be nice to see:
Week 23 - 06/04/2012 - 06/11/2012
Week 24 - 06/12/2012 - 06/19/2012
Week 25 - 06/19/2012 - 06/26/2012
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 Jul 2012 at 5:21am
this would appear that the grouping isn't working as one would think.
 
If this formula was displayed in the group header, then it should look like you want...at least I would think it would.
 
after all, it appears that the grouping is now by day and not by week.
IP IP Logged
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.