Skip to main content
Solved

Mail template with joined report : dynamic date parameters


Hi,

 

I’m want to send an e-mail with a joined report.

This report accepts 2 date parameters, with default values (DateFrom & DateTo) :

 

With a scheduled event, i trigger every month the email sending.

On the joined report settings, i have to specify his parameters values

 

In my case in want to have :

DateFrom : the start of the next month

DateTo : the end of the next month

I didn’t find the right syntax for this.

 

I also tried to not specify those parameters, but the default values of the report are not applied.

 

Any help would be great.

Thanks

 

Best answer by larryly

@lmalley I had same problem. Unfortunately I didn’t find any way to pass a calculated date to report in the email template. But I figured out another way to do that. I add a parameter call Period in the report. Catch the Period and calculate the date in the report.  Hope it helps. 

 

 

 

 

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+1
  • Semi-Pro II
  • 88 replies
  • Answer
  • August 28, 2023

@lmalley I had same problem. Unfortunately I didn’t find any way to pass a calculated date to report in the email template. But I figured out another way to do that. I add a parameter call Period in the report. Catch the Period and calculate the date in the report.  Hope it helps. 

 

 

 

 


Forum|alt.badge.img
  • Freshman I
  • 48 replies
  • January 21, 2025

@larryly 

Thank you for sharing your solution.  I am trying to implement this on a similar report and having issues getting the report to run for the correct date range.  Can you share how you setup your schema filter to utilze the ReportStart and ReportEnd  variables instead of the StartDate and EndDate parameters?


Forum|alt.badge.img+1
  • Semi-Pro II
  • 88 replies
  • January 21, 2025

@MattWSM Sorry about that the report was created for other people at long time ago. I don’t have the report on hand. You can check the screen.  I didn’t use StartDate and EndDate. I created ReportStart and ReportEnd in report’s header(Variables). Both values calculated based on Period(the value set in attached report in the system.). Then use the ReportStart and ReportEnd in the details section or your data section to filter the data.


Forum|alt.badge.img
  • Freshman I
  • 48 replies
  • January 21, 2025

@larryly Thanks for the reply….   

I have created the Variables ReportStart and ReportEnd in the Report headers as you described and as shown below:

 

 

I then setup my Parameter “DateRange” in the Schema as shown below:

 

For testing purposes I have added the data fields for $ReportStart and $ReportEnd to the header of my report and it calculates and displays the correct values based on what Date Range I have selected, however I cannot get the report to filter correctly.    In the Schema Filter I have tried about anything I can think of without any success.   Below is my latest attempt:

 

I have tried the following for the values with no success:

ReportStart,  $ReportStart, [$ReportStart], etc….

I feel like I am at the one yard line but the filter is stopping me from a touchdown.


Forum|alt.badge.img

@MattWSM , I would see if you can drop the report variables and put those formulas right into the Schema Builder fields where OrderDate >= <put in IIF formula> 

 


Forum|alt.badge.img
  • Freshman I
  • 48 replies
  • February 7, 2025

Travis,
Took me a while to get this working.  The catch to make it work was that it had to be DateTime, not String. Once I did that everything worked fine.
Thanks for your help.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings