How to Use One Combo Box to Change Data on Multiple Charts or Reports

The Bison System allows you to use one prompt (drop down box) to toggle between specific data criteria spanning multiple charts or reports. Below we outline how to achieve this task.

In this specific task we wanted to switch between four different data sets on two different charts. Although all four datasets are different, two of the sets are Amounts and the other two are Percentages.

1. Create two charts

a. Pull in the Amount data set for each chart

How to use 1 combo box 2

2. Create two more charts that will pull in the additional two datasets

How to use 1 combo box 4

3. Right click on each chart

a. Select Properties

b.Give each chart a unique name

4. Drag and drop the PCT charts on top of the Amount charts

a. Select Place component into tabbed interface

b. Click OK

 

** Now you have tabbed interfaces for each data groupings (COGS and Expenses)

 

How to use 1 combo box 7

5. Click and drag a Combo Box from Component Panel

6. Right Click and choose Properties

a. Under List Values (General Tab)

i.Check the Embedded check box

ii. Click Edit

7. Add two names to the Label and Values section

a. Amount

b. Percent

c. Click OK

d. Navigate back to the Viewsheet

8. Click on the Options button How to use 1 combo box 11 at the top of the screen

a. Click on the Script tab

b. Insert the following JavaScrip

Script:

if(ComboBox1.selectedObject==’Amount’)

{COGS.visible = true; COGSpct.visible = false;EXP.visible = true; EXPpct.visible = false;}

else if(ComboBox1.selectedObject==’Percent’)

{COGS.visible = false; COGSpct.visible = true;EXP.visible = false; EXPpct.visible = true;}

 

**The javascript will prompt the Viewsheet to hide either the Amount or Percent charts, depending on what is selected in the drop down

** Note that you will want to update the chart names (COGS, COGSpct, EXP and EXPpct) to represent your specific chart or report names

c. Click OK to navigate back to the view sheet

 

9. Preview the Viewsheet

10. Change the combo box to see the charts update