[Question | Telerik Standalone Report Designer]: How to show previous month date in text field parameter?

1 Answer 74 Views
DataSource SQL Filtering General Discussions HTMLTextBox Report Designer (standalone) Report Parameters
Austin
Top achievements
Rank 2
Iron
Iron
Iron
Austin asked on 04 Apr 2023, 07:53 PM

Good Afternoon Telerik,

 

I run a report for the previous month at the beginning of every month. In example, Today's Month is April- I run the report for the entire Month of March. How can I create a Text field within Telerik that will show the previous month in example March and updates every month so if I run it May 1st it'll show April etc..?

 

I've tried the following functions but kept getting an error. (see screenshot)

= Today(AddMonths() -1)

 


 

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Dimitar
Telerik team
answered on 07 Apr 2023, 10:11 AM

Hello Austin,

The problem with the expression is that the AddMonths(date, months) function should wrap the Today() date and not the other way around.

For example:

= AddMonths(Today(),-1)

I tested this expression locally and was able to get last month's data this way, please test it on your end too, and let me know if that helps.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Austin
Top achievements
Rank 2
Iron
Iron
Iron
commented on 15 May 2023, 06:31 PM

That worked great, Thank you!!!
Tags
DataSource SQL Filtering General Discussions HTMLTextBox Report Designer (standalone) Report Parameters
Asked by
Austin
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dimitar
Telerik team
Share this question
or