Passing Dates in Report Method Statements

posted Mar 5, 2013, 3:37 PM by Chad Boyer
So you create a great query ( Loan.ashx/AwesomeReport ) and like most reports you have a StartDate and EndDate.
You go ahead and create the ReportQuery and pass in some default values say Loan/AwesomeReport?StartDate=3/1/2013&EndDate=3/15/2013

When you go to run this you end up getting String cannot be converted to DateTime error.

The reason is that URL Method parsing splits on the / character so you are actually trying to put 3 into StartDate.

If you change this to:Loan/AwesomeReport?StartDate=3-1-2013&EndDate=3-15-2013

It works great.  Just an FYI.