Solved

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

Posted on 2014-04-28
2
2,280 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
[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 Comments
 
LVL 101

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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