The query that you are using in ODAG load script is correct. But i guess you are directly loading data from the on demand ( Template) application. That is why you are getting where condition like below.
If you want to design a ODAG application you must have to create two applications.
1. Selection Application
2. Template App
First you need to create a selection application with app navigation link ( that points your template app) , then from App navigation link try to generate a report. It will work.
I hope this will help you.