Hi, @Saeed , Happy New Year to you!
As @Malcolm mentions, this is not difficult to do, but guidance from The Soup will require a bit more information. For example: Can you provide what data you wish to report on? And how do you need it presented upon output?
For your user input for selecting the date range (month or year or whatever) may I suggest you consider having your users select month and year from drop-downs and/or calendar pickers. On your screenshot above you present a Custom Dialog requesting users to input month and year, but this is prone to errors as they can enter typos, reverse the month and year (not paying close attention), etc.
Here's a screen shot of an example case. It uses a popover with selectors. I also often do this in a card window instead of popover, depending on UI needs. In this case it was a "Reports" card window that allows for selecting various reports where Button Bars as popover are used.
The month and year selectors use defined Value Lists, Start Date/End Date use calendar pickers.
All four of these fields are from my Globals table (all fields use global storage, and there is only one record in the table: g_month ; g_year; g_startDate; g_endDate. These fields can be reused across the entire solution, and are unique to each user (per session).
If a month or year field is populated and the user then decides to enter a start date, the other fields are cleared, and vise versa.
If they enter only the year, the report is prepared for the entire year; If they enter only a month, sometimes I ask them to include the year, in other cases (per client option) I assume current year in the script.
Edit to add: I don't always like popovers for dialogs, so I use card windows as mentioned above. Here are a couple examples of how Card windows might be helpful. (Note: screenshots from different monitors so a bit inconsistent. (And once posted they look huge. LOL )