Skip to Content
avatar image
Former Member

Need to group days of the week from a payroll calendar perspective

I am trying to define pay periods but cannot figure it out. I am using:

if {reportexport.Date} = Date(2017,01,1) then "Week 00" else
if {reportexport.Date} = Date(2017,01,1) then "Week 00" else
if {reportexport.Date} = Date(2017,01,2) then "Week 00" else
if {reportexport.Date} = Date(2017,01,3) then "Week 00" else
if {reportexport.Date} = Date(2017,01,4) then "Week 00" else
if {reportexport.Date} = Date(2017,01,5) then "Week 01" else
if {reportexport.Date} = Date(2017,01,6) then "Week 01" else
if {reportexport.Date} = Date(2017,01,7) then "Week 01" else
if {reportexport.Date} = Date(2017,01,8) then "Week 01" else
if {reportexport.Date} = Date(2017,01,9) then "Week 01" else

But cant I just say something like if reportexport.date is between date1 and date 2 then "week 1"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Aug 25, 2017 at 05:27 PM

    There is an option to Group Weekly:

    1. Group records by date field

    2. Go to Report > Group Expert > select the Date Group > Click Options at the bottom > Select The section will be printed for each week

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 25, 2017 at 05:34 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 29, 2017 at 09:29 AM

    There is a week number function in Crystal

    DATEPART("ww",{reportexport.Date}, crSunday)

    Group on this formula

    Ian

    Add comment
    10|10000 characters needed characters exceeded