I am using ASP.NET MVC 4 (C#) to create a Telerik Reporting Report (v. 7.0.13.426).
I have the report created and everything works wonderfully except for one thing. You see, there is an option to select all orders from a certain date range. I have a From and a To Calendar Picker. I also have a checkbox for all dates. In my report, I have a textbox for the date ranges with the following code:
{Parameters.rpDateFr.Value.ToString("MM/dd/yyyy")} - {Parameters.rpDateTo.Value.ToString("MM/dd/yyyy")}
This works great! I have created a jQuery function for this checkbox that sets all dates to minDate (2012, 1, 1) and maxDate (currentDate).
Here's the code that is used to push the dates into Telerik Reporting for the to and from dates, but it comes back "Object Reference not set to an instance of an object") for the checkbox. I understand why that is because it is saying if the box is not checked, these are the Parameters. How do I set dates for Telerik Reporting this this checkbox is checked?
if (!$("#SearchAllDates").is(":checked")) {
qs.push("@(AdminCompanyInvoiceParameters.DateFr)=" + encodeURI($('#SearchDateFr').val()));
qs.push("@(AdminCompanyInvoiceParameters.DateTo)=" + encodeURI($('#SearchDateTo').val()));
}
Any suggestions??
I have the report created and everything works wonderfully except for one thing. You see, there is an option to select all orders from a certain date range. I have a From and a To Calendar Picker. I also have a checkbox for all dates. In my report, I have a textbox for the date ranges with the following code:
{Parameters.rpDateFr.Value.ToString("MM/dd/yyyy")} - {Parameters.rpDateTo.Value.ToString("MM/dd/yyyy")}
This works great! I have created a jQuery function for this checkbox that sets all dates to minDate (2012, 1, 1) and maxDate (currentDate).
Here's the code that is used to push the dates into Telerik Reporting for the to and from dates, but it comes back "Object Reference not set to an instance of an object") for the checkbox. I understand why that is because it is saying if the box is not checked, these are the Parameters. How do I set dates for Telerik Reporting this this checkbox is checked?
if (!$("#SearchAllDates").is(":checked")) {
qs.push("@(AdminCompanyInvoiceParameters.DateFr)=" + encodeURI($('#SearchDateFr').val()));
qs.push("@(AdminCompanyInvoiceParameters.DateTo)=" + encodeURI($('#SearchDateTo').val()));
}
Any suggestions??