Skip to Content
Former Member
Apr 26, 2011 at 04:06 AM

Need help in formula for month,YTD in crystal


Hi all,

I have to create a crystal report where I have 1 amt field and 1 date field (2011.APR)format.In report I hv to create a parameter

(stringdatatype) (2011.Apr,2010 aug..) ex:Lovs in parameter. record has to get data according to month and year selection . for example if I pass my parameter,

in month column need to get data from April 1st 2011 to April 30th 2011(that months data)

lastyearperiod column ...should get April 1st 2010 to April 30th 2010 data.

YTD : Jan 1st 2011 to april 30th 2011 data

Lastyear YTD: Jan 1st 2010 to April 30th 2010 data.

I have tried few formulas but nothing worked because I dont have trasaction dates .. datefield is 2011.JAN format. Need to use parameter to get data in period, lastyear perio, YTD , Last year YTD...Please help......I am new to crystal reports .

Thanks in advance,