# Email Reports

**URL:** <https://forum.inductiveautomation.com/t/email-reports/12439>\
**Category:** Ignition\
**Created:** [December 7, 2016, 2:50pm UTC](https://forum.inductiveautomation.com/t/email-reports/12439 "2016-12-07T14:50:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DWeber](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@DWeber](https://forum.inductiveautomation.com/u/DWeber)\
**Post date:** [December 7, 2016, 2:50pm UTC](https://forum.inductiveautomation.com/t/email-reports/12439/1 "2016-12-07T14:50:37Z")

</div>

I am trying to email a report based on the day of the week. On Monday I want data from previous week and the rest of the week would be previous day. How do I access the report properties(StartDate and EndDate) of the report so I can change the date range?

Date = system.date.now()  
DayofWeek = system.date.getDayOfWeek(Date)

#Mon  
if DayofWeek ==2:  
system.report.executeAndDistribute(path=“Ops Prod/DivisonalRollup”, project=“Downtime”, action= “email”,  
actionSettings = {“to”:[“xxx@smithfield.com”], “smtpServerName”:“Mysmithfield SMTP Server”, “from”:"IgnitionReporting@smithfield.com", “subject”:“PM Rollup”})

#Tues-Sun  
if DayofWeek ==3 or DayofWeek ==4 or DayofWeek ==5 or DayofWeek ==6 or DayofWeek ==7 or DayofWeek ==1:  
system.report.executeAndDistribute(path=“Ops Prod/DivisonalRollup”, project=“Downtime”, action= “email”,  
actionSettings = {“to”:[“xxx@smithfield.com”], “smtpServerName”:“Mysmithfield SMTP Server”, “from”:"IgnitionReporting@smithfield.com", “subject”:“PM Rollup”})

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 7, 2016, 3:27pm UTC](https://forum.inductiveautomation.com/t/email-reports/12439/2 "2016-12-07T15:27:01Z")

</div>

Use the “parameters” keyword to make a dictionary of the parameters you want to override, just like you did with actionSettings. The format for the dictionary entries is parameterName:value.

---

<div class="post-metadata">

**Author:** ![DWeber](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@DWeber](https://forum.inductiveautomation.com/u/DWeber)\
**Post date:** [December 8, 2016, 8:49pm UTC](https://forum.inductiveautomation.com/t/email-reports/12439/3 "2016-12-08T20:49:00Z")

</div>

That worked great thank you.
