Solved

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

Posted on 2013-05-20
4
310 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
  • 2
4 Comments
 
LVL 22

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 22

Accepted Solution

by:
Ido Millet earned 500 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now