got dynamic queries for reporting working