Detecting the environment in which a report runs

You can use the _DashboardsEnvironment variable to change the way a report behaves, according to whether it is viewed in Application Studio WebServices or in Dashboards.

The value of the _DashboardsEnvironment variable can be 0 or 1. 1 indicates that the report is running in Dashboards.

Another system variable for detecting the environment in which a report runs is _ServicesEnvironment. This variable is for use with future implementations of Infor BI, running on the Infor BI Services architecture.

This example uses the _DashboardsEnvironment variable in actions in a source report. Jump actions in the source report launch either a report or a dashboard, depending on whether the source report is viewed in Application Studio WebServices or in Dashboards.

  1. Create a Jump action in a cell with the condition =GlobalVariables._DashboardsEnvironment.Text=0. Specify a target report.
  2. In the same cell, create a Jump to dashboard action with the condition =GlobalVariables._DashboardsEnvironment.Text=1. Specify a target dashboard.