Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Reports - Need to Add date to the 1st Monday of the week

Posted on 2013-05-20
4
Medium Priority
?
318 Views
Last Modified: 2013-09-02
I am using a group to organize my expenses by week. My week goes from Monday to Sunday. This formula works great for grouping the data. But I need to add a date for the 1st or last day of the week.
Group Formula - DatePart ("ww",{Cornerstone_Solutions.Date},CrMonday)

Example May 13 (Monday) and May 19 (Last day of my week).

I would like May 13-19, 2013 to appear on the report in the Group Header #1. Currenly all I get is "20" because May 13-19 is the 20th week of the year I am guessing.

Any suggestions?
0
Comment
Question by:D_Bjerke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Ido Millet
ID: 39182913
Get the Day of the Week number, and subtract or add days accordingly to get the Monday or Saturday.
0
 
LVL 23

Accepted Solution

by:
Ido Millet earned 2000 total points
ID: 39182925
For example, using CurrentDate instead of the dates in your database:

ToText(Currentdate - (DayOfWeek(Currentdate) - 2)) & " - " & ToText(Currentdate - (DayOfWeek(Currentdate) - 8))
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question