I want to use the daterage selector on the reporting pane in conjunction with a general parameter. OQL statement is as follows: FROM Monitoring.Alert AS Alert WHERE Monitoring.Alert_Party = $Party GROUP BY DATEPART(YEAR, DateRecieve), DATEPART(MONTH, DateRecieve) SELECT COUNT(Alert.ID) AS Number, DATEPART(MONTH, DateRecieve) AS MonthNotReservedWord, DATEPART(YEAR, DateRecieve) AS YearNotReservedWord, DATEPART(MONTH, DateRecieve) + '/' + DATEPART(YEAR, DateRecieve) AS YearMonth, RANGEBEGIN ( $CreationDate ) AS CreationStart, RANGEEND ( $CreationDate ) AS CreationEnd ORDER BY YearNotReservedWord, MonthNotReservedWord The $Party variable works fine however the $CreationDate does not work at all. I don't quite understand how to link Alert/CreationDate to $CreationDate as an parameter. The idea is to select a start and end date to filter Alert/CreationDate. Thanks in advance......
asked
R. Somers
3 answers
1
See Stephan's comment this solved the problem for me, thx
FROM Monitoring.Alert AS Alert
WHERE Monitoring.Alert_Party = $Party AND
Alert.CreationDate >= RANGEBEGIN ( $CreationDate ) AND Alert.CreationDate <= RANGEEND ( $CreationDate )
GROUP BY DATEPART(YEAR, DateRecieve), DATEPART(MONTH, DateRecieve)
answered
R. Somers
0
If i understand correctly you should add something like Alert.CreationDate >= $CreationDateStart AND Alert.CreationDate <= $CreationDateEnd to your where statement.
answered
Stephan Numan
0
This does not work in combination with a daterange selector. It will only accept a parameter with a daterage property.
FROM Monitoring.Alert AS Alert
WHERE Monitoring.Alert_Party = $Party AND
Alert.CreationDate >= $CreationDateStart AND Alert.CreationDate <= $CreationDateEnd
GROUP BY DATEPART(YEAR, DateRecieve), DATEPART(MONTH, DateRecieve)