Hide the parameters panel

Stimulsoft Dashboards.WEB discussion
Post Reply
jk50po
Posts: 11
Joined: Wed May 27, 2020 7:28 am

Hide the parameters panel

Post by jk50po » Mon Jul 27, 2020 7:12 am

Hi Stimulsoft team.
I need to hide the parameters panel by default when the page loads. I need the parameters panel but I don’t want it to be displayed when the page loads. It will only be displayed after the button is clicked.
The version I use is Stimulsoft Dashboard Web 2020.2.3
thanks in advance
Attachments
QQ图片20200727150621.png
rt
QQ图片20200727150621.png (50.41 KiB) Viewed 206 times
Lech Kulikowski
Posts: 2707
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide the parameters panel

Post by Lech Kulikowski » Tue Jul 28, 2020 9:18 am

Hello,

You can call the following action:
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
viewer.renderHtml("content");
viewer.jsObject.postAction("Parameters");

Thank you.
jk50po
Posts: 11
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po » Wed Jul 29, 2020 6:44 am

Thank you for your answer, but I have a web version, not a JS version. Can you provide a web version implementation method
Lech Kulikowski
Posts: 2707
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide the parameters panel

Post by Lech Kulikowski » Fri Jul 31, 2020 12:34 pm

Hello,

Please check

Code: Select all

<cc2:StiWebViewer ID="StiWebViewer1" runat="server" Localization="en.xml" 
        OnGetReport="StiWebViewer1_GetReport" 
        OnGetReportData="StiWebViewer1_GetReportData"
        OnPrintReport="StiWebViewer1_PrintReport"
        OnExportReport="StiWebViewer1_ExportReport"
        OnExportReportResponse="StiWebViewer1_ExportReportResponse"
        OnEmailReport="StiWebViewer1_EmailReport"
        OnInteraction="StiWebViewer1_Interaction"
        OnDesignReport="StiWebViewer1_DesignReport1"
        OnViewerEvent="StiWebViewer1_ViewerEvent1" > 
    </cc2:StiWebViewer>
    <script>
        //where jsStiWebViewer1 - "js" + WebViewer ID
        jsStiWebViewer1.onready = function () {
            jsStiWebViewer1.showParametersPanel_ = jsStiWebViewer1.showParametersPanel;

            jsStiWebViewer1.showParametersPanel = function (data, jsObject) {
                jsStiWebViewer1.showParametersPanel_(data, jsObject);
                jsStiWebViewer1.postAction("Parameters");
            }
        }
    </script>
Thank you.
jk50po
Posts: 11
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po » Mon Aug 03, 2020 6:54 am

Thank you for your answer,The test is passed on the report page, but there will be problems on the dashboard page, as shown in the figure, the width of the page will not be adaptive (it will not cover the entire window), and you need to click the refresh button to adapt
Attachments
question1.png
question1.png (41.16 KiB) Viewed 108 times
Lech Kulikowski
Posts: 2707
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide the parameters panel

Post by Lech Kulikowski » Thu Aug 06, 2020 10:52 am

Hello,

Please check the folllowing code:

Code: Select all

//where jsStiWebViewer1 - "js" + WebViewer ID
    jsStiWebViewer1.onready = function () {
        jsStiWebViewer1.showParametersPanel_ = jsStiWebViewer1.showParametersPanel;

        jsStiWebViewer1.showParametersPanel = function (data, jsObject) {
            if (jsStiWebViewer1.showError(data)) data = null;
            jsStiWebViewer1.options.isParametersReceived = true;
            jsStiWebViewer1.options.paramsVariables = typeof data == "string" ? JSON.parse(data) : data;
            jsStiWebViewer1.InitializeParametersPanel();
            jsStiWebViewer1.controls.processImage.hide();

            if (jsStiWebViewer1.controls.parametersPanel) {
                jsStiWebViewer1.controls.parametersPanel.changeVisibleState(false);

                if (jsStiWebViewer1.controls.buttons.Parameters)
                    jsStiWebViewer1.controls.buttons.Parameters.setSelected(false);
            }

            if (jsStiWebViewer1.reportParams.type == "Dashboard")
                jsStiWebViewer1.postAction("GetPages");
        }
    }
Thank you.
jk50po
Posts: 11
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po » Fri Aug 07, 2020 2:06 am

Thanks for your feedback
Andrew
Posts: 3998
Joined: Fri Jun 09, 2006 3:58 am

Re: Hide the parameters panel

Post by Andrew » Fri Aug 07, 2020 5:27 am

You are welcome!
Post Reply