Added from - to in the pdf queries
Added orderby date value for queries
added orderby and from to for dates