Using Previous...Month or Last(n)...Months in SSRS
I have a need to set the visibility for my report to hide all rows not part of the last calendar month. This report may be auto generated on the 1st day of the next month via a subscription or it may be manually run at any time and should only display the data for the previous calendar month. I am at a loss for how to use either the Previous...month or the Last(n)...months function in my expression. <>Last(1),myfield.value,now(),months does not work... i'm new here... so dont kill me becuase I dont know my syntax... there is not much in the way of samples like there are for SQL. Any help is most appreciated.
February 26th, 2011 7:46am

do you want to just hide the data or filter it out completely? to filter them out you can do this in your query: (only get values from the previous month) where month(myfield) = month(dateadd(month, -1, getdate())) and year(myfield)= year(dateadd(month, -1, getdate()))
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2011 9:10am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics