Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Filtering Custom report b...
So there is a note underneath the SQL section of the Custom Section form that says:
"For report sections that can be filtered by release, use tokens ${ReleaseId} to filter by the specified release, or ${ReleaseAndChildIds} to filter by a comma-separated list of the release and child sprints/phases."
When I add an additional filter into my SQL:
"AND RQ.RELEASE_ID=${ReleaseId}"
Then it works correctly for the times when Release is selected. But when I select Release "---ALL---" value it doesn't work and no results are displayed.
What is passed to the query when Release='ALL' is selected and how should I account for the selection in my SQL?
Thank you!
The problem is that if you have no release selected, it returns back "-1" which won't match any release.
It is usually better to use:
AND RQ.RELEASE_ID IN {${ReleaseAndChildIds}}
that way it will return a comma-separated list of releases (and child sprints) if a release is selected, or all the releases, if '--all releases--' is selected.
Thank you David!
And if you have any questions, please email or call us at +1 (202) 558-6885