cancel
Showing results for 
Search instead for 
Did you mean: 

Display Month and 12 previous Months

Former Member
0 Kudos

I am trying to create a report (CRXI) which will display month data for the current month and the 12 previous months. I am going to use subreports (similar to a calendar report) but am having trouble displaying the 12 previous month, year headers.

I get the current month, year from a prompt date and then need to decrease a month for 12 months.

Any help would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martha,

You can create a formula for each month like;;

Month(Dateadd("M",-1,{?ParameterField))

You will get Parameter Inputdate -1 month

Hope this will help you

Thanks,

Sastry

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Martha,

If you want to create a report for last 12 months and don't want to include present month then use the record selection for main report as

(month({DateField}) < month(currentdate)
and 
year({DateField})= year(currentdate))
or
(month({DateField})>=month(currentdate)
and 
year({DateField})=year(currentdate)-1)

and in the subreport use the record selection to get current month date as

(month({DateField}) =month(currentdate)
and 
year({DateField})= year(currentdate))

Regards,

Raghavendra