Question : Calculate value of previous month using VB expression in SSRS report

I am creating a report using SSRS 2008, and I pass two parameter i.e Month and Year to get my report generated. Now my question is:

 the current months value and Year's values on the report is shown by

="Filter Value: " & MonthName(Parameters!ipv_firstPeriodMonth.Value) & " "  & Parameters!ipv_firstPeriodYear.Value

I want previous month value as well. ..How do i calculate previous month value by taking current month...Please suggest...

Answer : Calculate value of previous month using VB expression in SSRS report

How about the following snippet in attach.  It uses the parameters to construct a date, then subtracts one month, then gets the month's name out of it.
1:
=MonthName(Month(DateAdd("m", -1, CDate(Parameters!ipv_firstPeriodYear.Value.ToString() + "/" + Parameters!ipv_firstPeriodMonth.Value.ToString() + "/01"))))
Random Solutions  
 
programming4us programming4us