How to Use the Same Control on Multiple Pages
You can now create pages that show the same controls (e.g. drop-downs) in your documents.
Many people like to add controls (e.g. drop-downs) to their report which, among other things, enables viewers to filter the data shown on what they find most interesting. If you'd like to use the same control on multiple Pages, you can simply create a Page Master which contains this control and apply the layout where needed in your report. In doing this, your control will show the current selections and can be changed no matter which page of your report you are on. By selecting a different value in this control, all the connected outputs will update accordingly.
Here's how to set this up (you can follow along with this data set added to your Displayr document):
- In Displayr, go to Appearance > Page Master.
- Select one of the existing template pages, then Home > Duplicate.
- Under Properties > GENERAL > Label, give this new page a distinctive name, e.g. "Control Page".
- Go to Insert > Control and select the type of control you'd like to include. In this example, I'll use a Combo Box which works as a drop-down.
- Under Control > Items list, I'll use genders to keep things simple by typing in Male; Female. Your page should look similar to this:
- When done, select Appearance > Normal.
- Select the Control Page layout from the Insert > New Page menu to add a page with this control box to your report.
To see your control box in action:
- Insert a bar chart on one of the Control Page pages using Insert > Visualization > Bar Chart
- Under Inputs > DATA SOURCE Variables in 'Data' select Gender [d3]
- Hook up your combo box by changing Inputs > ROW MANIPULATIONS > Select rows to show by to Choosing from Combo Box or List Box control
- Select Combo.box in the Rows to show drop-down underneath. Now your control box will filter your bar chart:
- Click Insert > New Page > Control Page again to add another page in your report with the gender combo box. Change the value of the combo box to Female on this page and you can see the information is updated on both pages.
You can have multiple control boxes on a Page Master and multiple Page Master layouts can contain controls. For more examples on how to use control boxes in your report see: How to Connect Filters to a Combo Box Control and How to Dynamically Change a Question Based on a Control Box.