This is a migrated thread and some comments may be shown as answers.

Telerik Reporting "All Dates" Checkbox

1 Answer 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 30 May 2013, 10:40 PM
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??

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 04 Jun 2013, 12:00 PM
Hi Michael,

It is not very clear for us what your current scenario is. Therefore we will need some more information regarding it and it will be best if you are able to send us a runnable sample that exhibits the issue so that we are able to view and debug it locally - this will help us identify the culprit faster and advise you more accordingly.

In general if you need to change the parameters of the report you will have to send those parameters to the server and there to pass those values to the report. For more information please check the Using Report Parameters programmatically help article.

Regards,
IvanY
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or