# Report execute and distribute parameters

**URL:** <https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691>\
**Category:** Ignition\
**Created:** [April 12, 2018, 6:25pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691 "2018-04-12T18:25:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [April 12, 2018, 6:25pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691/1 "2018-04-12T18:25:39Z")

</div>

I have a report with multiple parameters. Some of the parameters are dependent on previously defined parameters.  
For instance: Duration = minutesBetween({StartDate},{EndDate})  
This works fine when running the report on a schedule. However, when running the report using system.report.executeAndDistribute() and passing the StartDate and EndDate parameters in, the calculated parameter “Duration” is not calculated.

---

<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:** [April 13, 2018, 2:15pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691/2 "2018-04-13T14:15:54Z")

</div>

Hmm… that’s certainly not what I expect.

What version are you running?

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [April 13, 2018, 3:57pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691/3 "2018-04-13T15:57:37Z")

</div>

I am running 7.9.7 (need more characters before I can reply…)

---

<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:** [April 16, 2018, 7:42pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691/4 "2018-04-16T19:42:36Z")

</div>

Sorry it took me a couple of days to get back to this. I can’t replicate this in 7.9.9, and nothing in this code has changed since 7.9.7. You’ll need to double check your script, and perhaps contact support for help on this.

---

<div class="post-metadata">

**Author:** ![wpmccormick](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wpmccormick/32/13940_2.png) [@wpmccormick](https://forum.inductiveautomation.com/u/wpmccormick)\
**Post date:** [January 16, 2020, 1:50pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691/5 "2020-01-16T13:50:48Z")

</div>

Did you ever solve this problem? I’m having the same exact problem on 8.0

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [January 16, 2020, 8:58pm UTC](https://forum.inductiveautomation.com/t/report-execute-and-distribute-parameters/17691/6 "2020-01-16T20:58:31Z")

</div>

I worked around it by querying my data for the StartDate and EndDate and then calculated the duration using:  
system.date.minutesBetween(StartDate,EndDate)
