Solved

Crystal Reports SubTotals , YTD Sales, MTD Sale and Week Sales on the same report

Posted on 2014-04-28
2
2,174 Views
Last Modified: 2014-04-28
Dear all,

I'm curious about how to achieve what I thought was a simple report showing Sales Year to Date, Month to Date and Week to Date.
All displayed on one Group Footer.

The best way to explain what I'm trying to achieve is attached below in the image.

I've been working with the Crystal Formula. e.g.
 Sum({Sales in GBP},{@Sales Month})

Open in new window


I guess need to create the following groups:

Group 1 =  Customer
Group 2 =  Sales Year
Group 3 =  Sales Month

Then using the today() formula I can work out how make a record selection for Year(SalesDate) = Year(Today())
Year to day Sales Total is quite easy.

But then how do I put on the same group footer the Month to Date total?
Then finally the Week to Date total on the same group footer?

I need some pointer in case I'm going about his in completely the wrong way.
Should I be using Running totals?

Thanks
mchallinor
Report-Layout.png
0
Comment
Question by:Mchallinor
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40027185
Crystal has prebuilt date range functions

YTD

If {SalesDate} IN YearToDate then
     {SalesAmount}
Else
    0


MTD
If {SalesDate} IN MonthToDate then
     {SalesAmount}
Else
    0


WTD
If {SalesDate} IN WeekToDateFromSun then
     {SalesAmount}
Else
    0

You can also use
LastFullWeek
Last7Days

The above formulas can be used in summary functions to get the total

mlmcc
0
 

Author Comment

by:Mchallinor
ID: 40027242
Wow,  How have I not used this formula before!   Thank you so much.
I thought it would be easy, but that is crazy simple.

Cheers
mchallinor
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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