Page 1 of 1

Undisplay a part of the Designer on Create Report

Posted: Tue Jul 04, 2017 3:04 pm
by PaPy
Hi,

I overwritted the Designer.onCreateReport() to do the job I wanted. I want to do not display this part of the designer (see in attachement) I want when my customer click on File -> New my overwritted function onCreateReport() be triggered.

It is possible to undisplay this view ? Or just display the "blank Report" or my own templates...

Re: Undisplay a part of the Designer on Create Report

Posted: Wed Jul 05, 2017 7:16 am
by HighAley
Hello.

Yes, you could remove any wizard and add your own templates.
Here is a sample code:

Code: Select all

            var designerId = "StiDesigner";
            var designer = new Stimulsoft.Designer.StiDesigner(options, designerId, false);
            designer.renderHtml("content");

            //---------------------
            var newReportPanel = designer.jsObject.options.newReportPanel || designer.jsObject.InitializeNewReportPanel();

            //Add custom image to designer images collection
            designer.jsObject.options.images["CustomButtonImage"] = "https://www.google.by/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png";

            //Create new button
            var customBigButton = designer.jsObject.NewReportPanelButton("customReportButton", "My Button", "CustomButtonImage");
            customBigButton.image.style.width = "150px";
            customBigButton.image.style.height = "200px";

            //Remove old wizard buttons
            newReportPanel.removeChild(newReportPanel.childNodes[1]);

            //Add new button
            var buttonsTable = designer.jsObject.CreateHTMLTable();
            buttonsTable.style.marginLeft = "20px";
            newReportPanel.appendChild(buttonsTable);
            buttonsTable.addCell(customBigButton);

            //Click event
            customBigButton.action = function () {
                var fileMenu = this.jsObject.options.menus.fileMenu || this.jsObject.InitializeFileMenu();
                fileMenu.changeVisibleState(false);
                setTimeout(function () {
                    //Write your code here
                    alert("customReportButton was clicked!");
                }, 200);
            }
            //------------------
Thank you.

Re: Undisplay a part of the Designer on Create Report

Posted: Wed Jul 05, 2017 1:16 pm
by PaPy
Great ! Thanks for your answer HighAley. :)

Re: Undisplay a part of the Designer on Create Report

Posted: Wed Jul 05, 2017 11:06 pm
by Alex K.
Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.

Re: Undisplay a part of the Designer on Create Report

Posted: Thu Jul 20, 2017 2:23 pm
by PaPy
Hello,

I discovered something that's bother me. I succeeded to use my own reportPanel but when I change the language of the interface I got the default reportPanel, so I lost my own reportPanel. I have to refresh if I want to see it again.

Is there a way to catch the changeLanguage event and recreate my own reportPanel ? Or a way to prevent this event to reset the default reportPanel ?

Thanks in advance.

Re: Undisplay a part of the Designer on Create Report

Posted: Sun Jul 23, 2017 8:19 pm
by Alex K.
Hello,

Could you please send us a simple project which reproduces the issue for analysis.

Thank you.

Re: Undisplay a part of the Designer on Create Report

Posted: Mon Jul 24, 2017 7:38 am
by PaPy
Hello,

I attached a sample project that reproduce the bug.

Here the steps :
  • Go to File -> New. You'll see my own reportPanel ;
  • Return to the report edition ;
  • On the right top on the screen, select an other language ;
  • Go to File -> New. My own reportPanel is lost. You'll see the default reportPanel.
I want to keep my own reportPanel.

Re: Undisplay a part of the Designer on Create Report

Posted: Wed Jul 26, 2017 7:12 pm
by HighAley
Hello.

We have reproduced the issue.
We need some time to find a solution for you.

Thank you.

Ticket reference: #4749.

Re: Undisplay a part of the Designer on Create Report

Posted: Tue Aug 01, 2017 12:11 pm
by HighAley
Hello.

We have made some changes in your file.
Please, try it.

Thank you.