Page 1 of 1

March 30th internal build update broke my previous working c

Posted: Tue May 26, 2015 1:46 pm
by bobsov
I call "SaveReport" command from my javascript code below. I pass some variables that I need on server side on reportName but I don't see that anymore when I debug it on server side.

Here is my javascript code that used to work for me.

Code: Select all

var self = this, params = {}, templateId = "0", templateName, refreshViewer = false;
            params.command = "SaveReport";

            //console.log(self.isTemplateNew);
            if (Object.keys(self.templateComboBox).length > 0) {
                templateId = self.templateComboBox.value();
                templateName = self.templateComboBox.text();
            }
            else {
                templateName = $("#reportName").val();
            }
            refreshViewer = $("input[name=refreshViewer]").prop("checked") || false;

            if (self.isTemplateNew) {
                templateId = "0";
            }

            params.reportName = templateName + "~" + templateId + "~" + refreshViewer;
            console.log(params);

            jsStiMobileDesigner1.options.reportIsModified = false;
            jsStiMobileDesigner1.options.report.reportName = params.reportName;
            console.log(params.reportName);
            jsStiMobileDesigner1.AddCommandToStack(params);


This used to work fine. Today I caught this as I was testing my code. This may have happened with March 30th internal build update I did. Please let me know if calling "SaveReport" functionality has changed. Please advice what would be alternate way.

Thank you.

Re: March 30th internal build update broke my previous worki

Posted: Tue May 26, 2015 2:25 pm
by bobsov
Sorry April 30 not march 30.

Re: March 30th internal build update broke my previous worki

Posted: Tue May 26, 2015 2:36 pm
by bobsov
This is the case with latest build too - May 22 build.

Re: March 30th internal build update broke my previous worki

Posted: Tue May 26, 2015 2:42 pm
by bobsov
I tried with Jan 24 build and it worked. So something broke between that and April 30 build. Hope this will help you guys investigate the issue and get to the root cause. Thank you.

Re: March 30th internal build update broke my previous worki

Posted: Wed May 27, 2015 1:28 pm
by Alex K.
Hello,

Please try to use the following code:

Code: Select all

params.reportName = "Base64Code;" + Base64.encode(templateName + "~" + templateId + "~" + refreshViewer);
instead:

Code: Select all

params.reportName = templateName + "~" + templateId + "~" + refreshViewer;
Thank you.

Re: March 30th internal build update broke my previous worki

Posted: Wed May 27, 2015 3:44 pm
by bobsov
Worked like a charm.

Thank you Aleksey.

Re: March 30th internal build update broke my previous worki

Posted: Thu May 28, 2015 9:29 am
by Alex K.
Hello,

Let us know if you need any additional help.

Thank you.