官术网_书友最值得收藏!

Using prompts

Prompt is an operand that enables a dynamic value insertion into the condition's last section. When we think about it, most reports use prompts as they require dynamic values in the conditions. The best example is a time-ranged report that requires the picking of different date values every day.

Getting ready

We need to edit our existing query filter so that business users will be able to choose country values dynamically.

How to do it...

First, we will change the operand type to Prompt, as shown in the following screenshot. Note that generic text is added to the prompt area that says Enter values for Client.

We will click on the Run query button. A prompt window will appear. In this prompt window, we will be asked to pick a value from the existing list of values, as shown in the following screenshot. As long as a value isn't picked, a red arrow will appear next to the prompt text.

We will pick the country Japan. The red arrow will change to green, confirming that the prompt has been answered.

You can run a search in the list of values by using the binoculars icon located at the bottom-center part of the prompt screen.

By clicking on the OK button, the query will run based on the value we picked and retrieve data for Japan, as shown in the following screenshot:

The next time we refresh the report, the prompt screen will launch again and enable us to change the value in the prompt.

How it works...

The prompt is an open question—a hardcoded condition always retrieves the same value. The prompt enables reports to be run according to parameters by creating the prompt window that enables users to pick a value dynamically.

Prompts are great for reports that are date-based, since potentially they need to run every day on a different range of dates. The same applies to regional sales reports—each regional manger requires the same report but different values in the conditions.

Prompts are probably the most common operands since they are so handy and, being dynamic, are in sync with most of the reports' nature.

There's more...

We can find the properties that enhance prompt options in the prompt condition.

Clicking on the question mark icon in the prompt condition makes the Prompt Properties window appear, as shown in the following screenshot:

The Prompt Properties window has several configuration options:

  • Prompt with list of values: This can use a list of values or enable free typing.
  • Keep last values selected: This keeps the last value that was picked in the prompt.
  • Select default value: This keeps a default value in the prompt.
  • Select only from list: This disables the free typing option and enables us to pick the value only from a list of values.
  • Optional prompt: This enables us to run the report without picking any value in the prompt. This is equivalent to ignoring the prompt if no value is picked but still enabling the user to pick a value, several values, or all the values in a single prompt.

The value or values returned by the prompt can also be displayed in a special predefined cell called Prompt Summary in the report, providing the right context of relevancy for the data in the report.

See also

  • For further information on how to use special fields that can reference the prompt values, see Chapter 9, Using Formulas and Variables
主站蜘蛛池模板: 囊谦县| 怀来县| 锦屏县| 黄骅市| 凌海市| 肥乡县| 昔阳县| 石林| 定襄县| 宣威市| 合山市| 双柏县| 项城市| 大庆市| 海兴县| 扶沟县| 鄂托克前旗| 台前县| 浏阳市| 南城县| 宁蒗| 龙江县| 兴仁县| 贡觉县| 隆林| 郯城县| 彭阳县| 临潭县| 房产| 南汇区| 阜康市| 曲水县| 隆化县| 高邮市| 兰西县| 兰溪市| 浮梁县| 上蔡县| 临城县| 永胜县| 昆明市|