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

problem with boolean parameter

1 Answer 276 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dyana
Top achievements
Rank 1
Dyana asked on 30 Jan 2012, 04:44 PM
Version=5.1.11.928

Adding a boolean parameter with visibility set to true, is causing a javascript error in the browser which means that the report never generates, and the "generating report" swirl keeps swirling.

If you just try to preview the report in the report creator, then it works fine.

The file throwing the error is Resources.Parameters.js:
the  method
BooleanEditor.prototype.Init = function ()
{
    var radioButtonList = document.getElementById(this.radioButtonID);
    if (radioButtonList)
    {
        var inputs = radioButtonList.getElementsByTagName("INPUT");
        if (inputs)
        {
            var editor = this;
            for (var i = 0; i < inputs.length; i++)
            {
                var input = inputs[i];
                input.onclick = function ()
                {
                    editor.ValueChanged();
                };
                var label = input.nextSibling;
                var text = "";
                var reportViewer = GetReportViewer();
                switch (i)
                {
                    case 0:
                        text = reportViewer.GetString("ReportParametersTrueValueLabel");
                        break;
                    case 1:
                        text = reportViewer.GetString("ReportParametersFalseValueLabel");
                        break;
                }
                label.firstChild.nodeValue = text;
            }
        }
    }
    return false;
}

var label = input.nextSibling;
results in label = null;
so once we get to:
label.firstChild.nodeValue = text;
an error is thrown. I've seen this both in IE8 and in Firefox 9.0.1

You can test it by creating a blank report, adding a single boolean parameter and making it visible.

You must then create a web project so you can view the report in a report viewer control in a browser.

If there's anyway I can fix this without creating "fake" string parameters and then remapping them to the real boolean parameters, please let me know.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 01 Feb 2012, 06:02 PM
Hello Dyana,

Thank you for the thorough description and steps to reproduce. We tested this case with the latest official Q3 SP1 2011 release, but could not reproduce such a problem. Please upgrade and if the problem persists, we would appreciate if you attach a sample runnable project that exhibits the issue.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

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