Print Page | Close Window

Daily sales comparison report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21256
Printed Date: 05 May 2024 at 9:06am


Topic: Daily sales comparison report
Posted By: refeesh
Subject: Daily sales comparison report
Date Posted: 06 Jan 2015 at 2:20am
dear,

i want to make a daily comparison report with last year and current date. can you advice me how can i put formula to get this


example

item name date      today sales     last year sales
xxxxx     06-1-15        25000          27000

kindly advice me how can i get this also i need to get the weekly sales with last year the same week.



Replies:
Posted By: refeesh
Date Posted: 07 Jan 2015 at 10:42pm
kindly somebody answer me. please


Posted By: kevlray
Date Posted: 08 Jan 2015 at 4:46am
Not sure how to get the same week.  You might be able to use the datediff function and and assume a 52 week difference.

As far as difference, once you have established the values, you should be able to subtract them in a formula.


Posted By: DBlank
Date Posted: 08 Jan 2015 at 5:40am
day:
table.date=currentdate or table.date = dateadd('yyyy',-1,currentdate)
 
weekly depends on how you are defining it but one way would be like kevray suggests.
This would give you a full week for last year and possibly a partila week for the current year
 
datepart('ww',currentdate)=datepart('ww',table.datefield) and (datepart('yyyy',table.datefield) = datepart('yyyy',currentdate) or datepart('yyyy',table.datefield) = datepart('yyyy',dateadd('yyyy',-1,currentdate)))



Print Page | Close Window