Solved

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

Posted on 2013-05-20
4
311 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

23 Experts available now in Live!

Get 1:1 Help Now