Learn how to a build a cloud-first strategyRegister Now


Crystal Reports XI - Sum of Cases between date range

Posted on 2009-04-23
Medium Priority
Last Modified: 2012-05-06
Please look below at the attachment to see what I'm trying to do more clearly in case this isn't clear.

Have a report that I'm trying to build that WILL NOT be a CROSS TAB. I want to build a formula that says:
- SUM{tblcases.numbercases} in {tblcases.casedate} in Date(2008,10,01) to (2008,12,31)
-  This would of course be a sum, for a particular hospital, for Q408.

I would then build a separate formula for Q108, Q208, Q308 and so on and drop them in the appropriate spot in the  layout.

I want my current Quarter Total (in the example image USE Q108 as current) to calcualte absolute percentage increase or decrease over the previous quarter.

ANY HELP would be GREAT!!!! Thanks!
Question by:dsabine
LVL 101

Accepted Solution

mlmcc earned 750 total points
ID: 24219423
Try this idea

If {tblcases.casedate} in Date(2008,10,01) to (2008,12,31) then

You can then use a summary function on the formula

Another way if you are going to group by the quarter is
Group on the date field
Select QUARTER as the period
You can then summarize the fields in the group footer

LVL 16

Assisted Solution

wykabryan earned 750 total points
ID: 24224540
Well for your Quarter columns I would using running totals.

Set up each like this.
Field to Summarize: numbercases
Summary Type: Sum

Evaluate: Use a formula: This is where you would specify a date range for each quarter

Reset: On change of group: CustomerName. Assuming you are grouping by customer (which you should be otherwise you run the risk of having a dup customer name.)

Click ok. Do this for each. Then your variance column is a formula based on the running totals.

Author Comment

ID: 24242952

When I tried your solution, the Quarter Columns give me either a 1 or a zero but not a total for each hospital. I am able to do a running total that appears to be correct total for the quarter but I also need totals for each hospital.


When I try your solution, it gives me totals for the hospitals but only for the date parameter set for the ENTIRE REPORT based on GROUP SELECTION in SELECTION FORMULAS. When I incorporate this, if the report is for all of 2008, the column shows total numbers for 2008 not just the quarter.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month20 days, 18 hours left to enroll

810 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