# Problem query report data using timestamp

**URL:** <https://forum.inductiveautomation.com/t/problem-query-report-data-using-timestamp/11484>\
**Category:** Ignition\
**Created:** [April 8, 2016, 4:12pm UTC](https://forum.inductiveautomation.com/t/problem-query-report-data-using-timestamp/11484 "2016-04-08T16:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [April 8, 2016, 4:12pm UTC](https://forum.inductiveautomation.com/t/problem-query-report-data-using-timestamp/11484/1 "2016-04-08T16:12:30Z")

</div>

I am using the reporting module for the first time and am having an issue running a query using a popup calendar to specify start time and end time to query data from MySql datatable.  
query in report:

[attachment=4]2016-04-08 12\_00\_20-192.168.10.10 - Remote Desktop Connection.png[/attachment]

report does not show data, but a test table using exact same query will show data:

[attachment=3]2016-04-08 12\_00\_47-192.168.10.10 - Remote Desktop Connection.png[/attachment]

table query:

[attachment=1]2016-04-08 12\_08\_05-192.168.10.10 - Remote Desktop Connection.png[/attachment]

startdate property of report bound to pop up calendar:

[attachment=0]2016-04-08 12\_09\_50-.png[/attachment]

am I missing something?

---

<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 8, 2016, 9:18pm UTC](https://forum.inductiveautomation.com/t/problem-query-report-data-using-timestamp/11484/2 "2016-04-08T21:18:00Z")

</div>

This is going to be easiest to solve if you contact support.

That said, I always start troubleshooting reports that don’t show data by looking at the preview panel in the reporting workspace. The right hand side of the panel shows the sample data (limited to 100 records, unless you changed it) brought back from the database. That will tell you if the problem is with the query or the layout.

Also, when using parameters in queries, you will have better results if you use the ? place holder in a SQL Query (not the Basic SQL Query). That will bring up a box below where you can enter the parameter you want to use.

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [April 8, 2016, 11:02pm UTC](https://forum.inductiveautomation.com/t/problem-query-report-data-using-timestamp/11484/3 "2016-04-08T23:02:55Z")

</div>

[quote=“KathyApplebaum”]This is going to be easiest to solve if you contact support.

That said, I always start troubleshooting reports that don’t show data by looking at the preview panel in the reporting workspace. The right hand side of the panel shows the sample data (limited to 100 records, unless you changed it) brought back from the database. That will tell you if the problem is with the query or the layout.

Also, when using parameters in queries, you will have better results if you use the ? place holder in a SQL Query (not the Basic SQL Query). That will bring up a box below where you can enter the parameter you want to use.[/quote]

That did not work, but what i find does work if I build the entire WhereClause parameter by concatenating the search string + date into string to query the database.

[attachment=1]2016-04-09 07\_58\_56-192.168.10.10 - Remote Desktop Connection.png[/attachment]

[attachment=0]2016-04-09 07\_59\_25-.png[/attachment]
