Hide the parameters panel

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

Hide the parameters panel

Post by jk50po »

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
rt
rt
QQ图片20200727150621.png (50.41 KiB) Viewed 4048 times
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide the parameters panel

Post by Lech Kulikowski »

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: 29
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po »

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: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide the parameters panel

Post by Lech Kulikowski »

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: 29
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po »

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 3950 times
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide the parameters panel

Post by Lech Kulikowski »

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: 29
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po »

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

Re: Hide the parameters panel

Post by Andrew »

You are welcome!
jk50po
Posts: 29
Joined: Wed May 27, 2020 7:28 am

Re: Hide the parameters panel

Post by jk50po »

I'm sorry to bother you, because the needs of the project have been changed to the netcore version, can you provide a netcore solution to this problem?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Hide the parameters panel

Post by HighAley »

Hello,

The code will be the same, you need just change the name of the Viewer object.

Thank you.
Post Reply