WebDesigner JavaScript Error

Stimulsoft Reports.WEB discussion
Post Reply
mkeuschn
Posts: 17
Joined: Thu Apr 03, 2014 8:56 am

WebDesigner JavaScript Error

Post by mkeuschn »

Hello *,

I get an JavaScript Error when I try to open a WebDesigner Instance.

In the Stimulsoft.Report.Web.Designer.Scripts.Initialize.Controls.InitializeStylesControl.js File stylesControl.repaint Function.

Code: Select all

    stylesControl.repaint = function () {
        var font = "Arial!8!0!0!0!0";
        var brush = "1!transparent";
        var textBrush = "1!0,0,0";
        var border = "default";

        captionInnerContainer.style.top = "0px";
        captionInnerContainer.style.margin = "0px";

        if (this.typeComponent == "StiChart" || this.typeComponent == "StiGauge" || this.typeComponent == "StiCrossTab" || this.typeComponent == "StiTable") {
            this.jsObject.RepaintControlByAttributes(button.caption, font, brush, textBrush, border);
            if (this.key != "[None]" && this.key != "StiEmptyValue") {
                button.caption.style.border = "0px";
                if (this.typeComponent == "StiChart" || this.typeComponent == "StiMap") {
                    captionInnerContainer.style.margin = "-10px -10px -9px -10px";
                }
                else if (this.typeComponent == "StiGauge") {
                    captionInnerContainer.style.margin = "0px 0px 0px -10px";
                }
            }
        }
        else {
            if (this.jsObject.options.report) {
                var stylesCollection = this.jsObject.options.report.stylesCollection;
                for (var i in stylesCollection) {
                    var properties = stylesCollection[i].properties;
                    if (properties.name == this.key) {
                        if (properties["font"] != null && properties["allowUseFont"]) font = properties.font;
                        if (properties["brush"] != null && properties["allowUseBrush"]) brush = properties.brush;
                        if (properties["textBrush"] != null && properties["allowUseTextBrush"]) textBrush = properties.textBrush;
                        if (properties["border"] != null && properties["allowUseBorderSides"]) border = properties.border;
                    }
                }
            }
            var captionInnerContainerHeight = parseInt(font.split("!")[1]) * 1.33;
            captionInnerContainer.style.top = (captionInnerContainerHeight > captionContainer.maxHeight ? ((captionInnerContainerHeight - captionContainer.maxHeight) / 2 * -1) : 0) + "px";
            this.jsObject.RepaintControlByAttributes(button.caption, font, brush, textBrush, border);
        }
    }
The "for (var i in stylesCollection)" Loop iterates over all properties of the object (the error occours when "i" has the value "contains") => I think this should be replaced by a "for(;;)" Loop which is only iterating over the elements in the array.
JavaScript Error
JavaScript Error
sti.png (28.22 KiB) Viewed 2791 times
Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: WebDesigner JavaScript Error

Post by Alex K. »

Hello,

Thank you for the detailed description.
The issue is fixed, will be available in the next build.

Thank you.
mkeuschn
Posts: 17
Joined: Thu Apr 03, 2014 8:56 am

Re: WebDesigner JavaScript Error

Post by mkeuschn »

Thank you, when is the next build available?

Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: WebDesigner JavaScript Error

Post by Alex K. »

Hello,

The next build 2018.1.6 will be available within several weeks.
If you need it immediately, please send us a request on support@stimulsoft.com

Thank you.
mkeuschn
Posts: 17
Joined: Thu Apr 03, 2014 8:56 am

Re: WebDesigner JavaScript Error

Post by mkeuschn »

Now we are using the updated dlls. Unfortunately we are getting the same error in another function.

"StiMobileDesigner.prototype.BrushMenu"

Error:
StiMobileDesigner.prototype.BrushMenu
StiMobileDesigner.prototype.BrushMenu
sti2.png (49.26 KiB) Viewed 2766 times
Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: WebDesigner JavaScript Error

Post by Alex K. »

Hello,

We need some additional time to investigate all places in code.

Thank you.
mkeuschn
Posts: 17
Joined: Thu Apr 03, 2014 8:56 am

Re: WebDesigner JavaScript Error

Post by mkeuschn »

Please leave a message when you are ready.

Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: WebDesigner JavaScript Error

Post by Alex K. »

Hello,

We send the new version of dll files by email.

Thank you.
Post Reply