Quick BI provides global parameters for configuring variables. When configuring a chart, you can reference global variables to push different data to different users. This topic describes how to configure global parameters in scenarios such as jumping, email subscription, and report embedding.
Background Information
For example, a sales team serving all regions in China must track sales in more than 30 provinces, along with cities and counties of each province in real time. As the business continuously grows and expands, the team must view an increasing amount of sales data. Among the complex and massive data, Quick BI provides a solution that enables the person in charge of a region to view only data in this region. This improves work efficiency and prevents the leak of sensitive business data.
Global parameters provide a standardized entry point for reports, allowing report users to dynamically change the filter conditions of charts and query controls within the report by injecting URL parameters when previewing the report, thereby controlling the internal data display results of charts from the outside. The objects affected by global parameters currently include the following two types:
Query controls: After receiving global parameters, query controls directly use the conditions injected by global parameters as default values and bind them to specific sub-components.
NoteThe charts that are actually affected still depend on the scope of action selected by the corresponding sub-component. Because only the default value is changed, report users can actually change the actual value of the sub-component to break away from the control of global parameters.
Charts: Charts associated with global parameters essentially append an AND fragment to the final SQL query of the chart (for example,
and area = 'North China'
). This process is directly parsed by the server based on the global parameter configuration, so report users cannot change this result and can only verify the data result through the finally generated sqlText.
Global Parameter Configuration Instructions
The entry point for global parameter configuration is located at the top of the report. When creating a new report, the global parameter icon is hidden and only displayed after saving. The global parameter configuration page is shown below.
Area | Description |
① | Global parameter configuration entry. Global parameter configuration depends on the component data model within the report. It is recommended to reconfigure global parameters after each update of the chart model. |
② | Configure global variables. The name of the bucket must meet the following requirements:
You can click the |
③ | Select parameter-associated controls and charts.
Note To ensure the accuracy and effectiveness of parameter injection, in actual use, you should try to ensure that each parameter has a clear and single responsibility. Be cautious when associating a global parameter with multiple query controls or mixing query controls and datasets. If the actual business requires it, it is recommended to add multiple parameters to control different query controls and charts separately. Field selection:
|
④ | Parameter settings.
|
To ensure the validity of parameters, real-time detection is performed during the global parameter configuration process. When a conflict occurs with one parameter, all global parameters cannot be saved.
The global parameter configuration process depends on the current content of the report. Changes to the report may cause previously configured global parameter injections to fail. Therefore, it is recommended to review the effectiveness of the global parameter configuration after each report change. If there is a conflict in the global parameter configuration, please adjust the content of the corresponding parameter according to the prompt.
Scenarios
Jump Scenario
Take jumping from a ranking list (order information) to a cross table (product information) as an example.
Log on to the Quick BI console.
Go to the dashboard page.
In the Taobao Product Order Details dashboard, create a Product Information cross table and configure global parameters for the cross table.
In the Data tab, select sales data as the dataset and name it Taobao Product Order Details.
Add a cross table to the dashboard, name it Product Information, and click Save in the menu bar at the top of the dashboard.
In the menu bar at the top of the dashboard, click the
icon.
On the Global Parameter Configuration page, configure global parameters as shown in the example below, and then click OK.
In the menu bar at the top of the dashboard, click Save And Publish.
In the Order Sales Details dashboard, create an Order Information ranking list and set it to jump to the Product Information cross table.
In the Data tab of the dashboard editing page, select sales data as the dataset and name it Order Sales Details.
Add a ranking list to the dashboard as shown below and name it Order Information.
Click the Analysis tab, and in the Data Interaction area, click the Jump Configuration
icon.
On the Jump page, set the parameters as shown below and click OK.
For more information, see Jump.
Click the target Order Number in the Order Information ranking list, and it will automatically jump to the Taobao Product Order Details dashboard and display the product information for the target Order Number.
The following figure shows the page that appears.
Email Subscription Scenario
When creating email subscription tasks, you can inject filter conditions into charts within the report through global parameters. The following only introduces the use of global parameters in email subscriptions. For more information, see Create a Subscription Task.
On the Create Task page of email subscription, set the Content of the subscription task to a dashboard with configured global parameters.
After setting it to a dashboard with configured global parameters, the system will automatically bring up the corresponding global parameter list. The global parameters are initially unconfigured and do not take effect by default.
Setting the Parameter Value to empty and not setting the parameter are two different states. If the Parameter Value is set to empty and the associated query control allows empty values, the value of the associated condition will be reset to empty. If the Parameter Value is not set, it will not affect the query control and chart.
Click the icon in the Operation column to configure the global parameters.
The content of the parameter configuration items will automatically match the type of the parameter-associated field. When associating charts, parameter configuration allows switching the condition form. When associating query controls, only changing operators and values is allowed.
After completing the parameter configuration of the subscription task, you can ensure that the corresponding parameters will be automatically injected into the report's filter conditions each time the subscription task is performed.
Report Embedding Scenario
For more information, see Security Enhancement Solution for Embedded Data Permission Control and Parameter Transmission in Reports.