Report Nested Query issue

I’m tryin to use the report parameters StartDate and EndDate wihtin a query datasource, which is a nested query. See image for setup

The highlighted “?” are supposed to use the report parameters, the first “?” is supposed to refer to the
parent query result.

I keep getting the error below


If I hardcode some dates in like ‘2021/09/13 12:00:00.000’ and ‘2021/10/13 11:03:10.000’, including the single quote, it works just fine.

The return types of the parameters are DATE
StartDate = dateArithmetic(now(), -8, “hr”)
EndDate = now()

I’ve tried CASTing the parameters like below


it always returns a time out error.


If I try this in the Query Builder or in SSMS it works fine…

Using Ignition 8.16.

Your first parameter is blank.

When it’s blank it’s supposed to refer to the parent query result…

You can’t leave it blank. The parent result is a row. You need a column reference to get a value from that row. (And where did you get the idea it could be blank?)

Your right, it can not be blank…I thought the parameter was blank when I started testing WITHOUT the date range checking and there were no error reported…going back to that code I see that it defaulted the parameter to the parent SQL query column name…I could’ve swear it was blank yesterday :smiley:

1 Like

Working now…without CASTing too!

1 Like