# Ignition perspective reporting parameters

**URL:** <https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 16, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879 "2024-12-16T13:33:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathaniel\_Webb](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nathaniel\_Webb](https://forum.inductiveautomation.com/u/Nathaniel_Webb)\
**Post date:** [December 16, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/1 "2024-12-16T13:33:49Z")

</div>

Hello,  
I am adding two components to a reporting viewer in order to select the query time range. I am having trouble getting the data to pass through. I see two different areas where I can pass the parameter through.  
1)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/19a4be44e06bb520af10f827b4e78083fa95e671.png)  
2)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/dacefaca14ea0b53ef15e1fa74fe41979ee3fdf6.png)

I am binding my EndDate and StartDate parameter to my components. I then specify my paremeters in my sql script.:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/7/f75682e49dc8e163b7d78c8c5072e9340038f0a7.png)

```SELECT
    reason,
    SUM(downtime_duration_minutes) AS total_minutes,
    COUNT(*) AS reason_count
FROM 
    ignition.senntech_201_reporting_downtime_interval
WHERE 
    event_time >= :StartDate
    AND event_time < :EndDate
GROUP BY 
    reason
ORDER BY 
    total_minutes DESC;

```

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 16, 2024, 1:50pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/2 "2024-12-16T13:50:03Z")

</div>

If you are using a query source in the report, you don't use the regular named query place holders for parameters. You instead use a question mark

```python
WHERE 
    event_time between ? AND ?

```

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Webb](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nathaniel\_Webb](https://forum.inductiveautomation.com/u/Nathaniel_Webb)\
**Post date:** [December 16, 2024, 1:54pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/3 "2024-12-16T13:54:31Z")

</div>

Thank you, do I now need to use the parameter 1 and 2 at the bottom of the report editor? Does this mean I will no longer use the parameters at the top left?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/1/112ca693f63bb5e4061ac9a99ad6a3bddeb45007.png)

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 16, 2024, 1:55pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/4 "2024-12-16T13:55:18Z")

</div>

Press the braces button and select the param name you want to substitute in. Keep the parameters in the top left.

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Webb](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nathaniel\_Webb](https://forum.inductiveautomation.com/u/Nathaniel_Webb)\
**Post date:** [December 16, 2024, 1:57pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/5 "2024-12-16T13:57:24Z")

</div>

Awesome! You have helped me very much. I couldn't find much about this in the manual.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 16, 2024, 2:03pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/6 "2024-12-16T14:03:04Z")

</div>

Also, note that the value you provide in the report for each parameter are defaults. This is so you can test the report in place. When you provide parameters, either from a report viewer or the script function, they override the default parameter values, so you don't have to leave them blank in the report.

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Webb](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nathaniel\_Webb](https://forum.inductiveautomation.com/u/Nathaniel_Webb)\
**Post date:** [December 16, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-reporting-parameters/99879/7 "2024-12-16T14:58:32Z")

</div>

Thanks, was just wondering.
