Filter for previous month

Stimulsoft Reports.WEB discussion
davidanthonyb
Posts: 22
Joined: Sun Apr 03, 2016 2:09 pm

Re: Filter for previous month

Post by davidanthonyb »

Aleksey wrote:Hello,

Please check the modified report in the attachment.

Thank you.

Hi Aleksey,

Thanks again for your help! That was almost perfect, but I did need to make 2 changes. I changed the first operator to >= instead of just greater than. I also noticed that in the report you sent, it was excluding any transactions from January 31st. To fix that, I removed the .AddDays(-1) from the end of the expression, and now all transactions from the previous month are showing correctly!

Code: Select all

(Table1.InventoryHistoryHistoryDateTime >= new DateTime(Today.Year, Today.Month, 1).AddMonths(-1)) && (Table1.InventoryHistoryHistoryDateTime < new DateTime(Today.Year, Today.Month, 1))

Thanks so much, helpful as always! :)
David
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Filter for previous month

Post by Alex K. »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply