Print Page | Close Window

*** Capture Date for previous 48 Week ***

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17559
Printed Date: 02 May 2025 at 5:49pm


Topic: *** Capture Date for previous 48 Week ***
Posted By: mickey_aw
Subject: *** Capture Date for previous 48 Week ***
Date Posted: 13 Sep 2012 at 3:59am
Dear CR Expert,

Could you please help me regarding this issue?
I would like to be able to capture the number of quantity of inventory sold by weekly ( 7 days) for 48 week. We have the cutoff on inventory from Mon to Sun

For example;
ItemID ItemDes   QtWk48 QtWk47 QtWk46 ….. QtWk2 QtWk1

Which formula should I use? Your help would be much appreciated

Thanks in advance

Update: I have been able to use cross tab ; however , I would like to let the user input the current date(parameter) and the end day is dynamic backward for 48 weeks that shows in the cross tab. Please suggest.



Replies:
Posted By: hilfy
Date Posted: 14 Sep 2012 at 9:37am
I would create a formula that calculates the date that's 48 weeks in the past (I'll call it {@StartDate}.  Then, in the Select Expert, click on the "Formula" button and edit the formula to include something like this:
 
{MyTable.DateField} in {@StartDate} to CurrentDate
 
If you HAVE to have a parameter, replace "CurrentDate" with the call to the param.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window