Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Date Parameter minus 1 year to get data Post Reply Post New Topic
Author Message
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Topic: Date Parameter minus 1 year to get data
    Posted: 10 May 2012 at 7:26am
I am using this formula below and it is not grabbing prior year MTD data.  what am I doing wrong?  I use the same basic formula to get this year MTD and it works.



if month({?Date})=month({SO_SalesOrderHistoryHeader.OrderDate}) and year({?Date})-1 = (year({SO_SalesOrderHistoryHeader.OrderDate})) then
{SO_SalesOrderHistoryHeader.TaxableAmt}+{SO_SalesOrderHistoryHeader.NonTaxableAmt} else 0
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 May 2012 at 8:23am
looks correct.
if either field would be NULL then you will get no return unless you set the formula to use defualt values for null
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 May 2012 at 8:24am
also you are not limiting the data set in the select expert to exlude the data, correct?
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.