Print Page | Close Window

Weekly Values

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21801
Printed Date: 02 May 2024 at 10:09pm


Topic: Weekly Values
Posted By: Kitty1
Subject: Weekly Values
Date Posted: 08 Dec 2015 at 5:01am
Hi,

I am looking to write a report to give weekly totals of number of quotes and dollar amounts.

I want to pull in data between 2 parameter dates. or at least between one parameter date and today's date.

So, if someone entered beginning date of 11/1/2015 it would return values of
11/1/2015 - 11/7/2015 totals
11/8/2015 - 11/14/2015 totals
etc.

so that if they ran it to date, using the same starting date, the report would keep getting larger as each week went by.

Is this something that is even possible? I am pretty much a novice with Crystal so any help i could get would be greatly appreciated! Thanks!



Replies:
Posted By: kevlray
Date Posted: 08 Dec 2015 at 9:48am
As long as you sent your date filters correctly, yes the report would continue to grow as more data is available.  So I would assume in the select expert formula.  It would look something like this.

{Date field} >= {?Date Parameter}
and {Date field} <= currentdate()


Posted By: Kitty1
Date Posted: 11 Dec 2015 at 4:36am
Hi,

thank you for the response. I've been tied up with other things so just getting back to this. Is there a way to show week totals for each 7 day time period without using parameter data for each week?     by just using a beginning date? say if someone used a beginning date of 7/5/2015

i would want to show on separate lines, activity between 7/5 and 7/11,
then activity between 7/12 and 7/18, etc. right up until either today's date (or another parameter set as an ending date)

Is there a way to add to the starting date+6 days, and then that date+6 days etc...if that makes any sense ?

thanks!


Posted By: kevlray
Date Posted: 14 Dec 2015 at 5:03am
I think (if I understand correctly) the answer should be yes.  One trick you can use is group by the date (you have options on how long the time period is for the the group). 

You can do a lot of math on date fields (as simple as just adding or subtracting a number).  There is the dateadd function.  There are a number of options you can do with the dateadd function. 



Print Page | Close Window