I. Overview
1.1 Requirement
How to display the parameter pane when switching to the first sheet and hide it when switching to other sheets?
1.2 Solution
$(".parameter-container-collapseimg-up").trigger("click");// Trigger the fold function to hide the parameter pane
$(".parameter-container-collapseimg-down").trigger("click");}// Trigger the drop-down function to display the parameter pane
You will learn |
---|
|
II. Sample
2.1 Steps
1)In the report design interface, add a button and create four sheets in the parameter pane, as shown below:
2) Click [Template]-[Web Attributes]-[Data Entry Settings] to add a Load End event:
Input the following JavaScript codes:
$(".fr-sheetbutton-container").click(function()//When switch between sheets
{var a=contentPane.$contentPane.data('TabPane').tabBtns[contentPane.selectedIndex].options.name;// Get sheets’ names
if(a=="Anna")
{
$(".parameter-container-collapseimg-down").trigger("click");// Trigger the drop-down function to display the parameter pane
}
else{
$(".parameter-container-collapseimg-up").trigger("click");//Trigger the fold function to hide the parameter pane
}
});
2.2 Preview
Save the template and click [Data Entry Preview]. The preview effect on a PC is shown as below: