Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Error Message when attempting to use filter expression for automated calculation of prior month

I am attempting to create a paginated report that I can schedule to run on the 1st of every month without always putting in the date parameters. I am attempting to use a filter expression: 

'beginning of month

=DateSerial(Year(DateAdd("m", -1, Today())), Month(DateAdd("m", -1, Today())),1)

 

'End of month

=DateSerial(Year(DateAdd("m", -1, Today())),Month(DateAdd("m", -1, Today())), Day(DateAdd("d", -1, DateSerial(Year(Today()), Month(Today()), 1)) ) )


But get the followin Error: The processing of FilterExpression for the dataset 'Filtered' cannot be performed. Cannot compare data of types System.DateTimeOffset and System.DateTime. Please check the data type returned by the FilterExpression.

 

Any ideas what I can do to fix this?