Display Data Source name in report

bad_robot
edited February 11, 2022 in Analytics #1

Hi there,

I have 3 Data Sources (Development, Acceptance and Production) and I want to display in my report which Data Source I'm using. This to prevent I'm not deploying a report to Production while the Data Source is still on Acceptance. How can I do this?

Thank you.

Best Answer

Answers

  • jfranken
    edited July 9, 2018 #3

    To display a data source name on a report, do the following:

    • On the Data Explorer tab, add a report variable named something like "dataSourceName".
    • In the beforeOpen event of the data source, add code like: vars["dataSourceName"] = this.getName();
    • Drag the report variable to the layout and drop it. A data element will automatically be created to display the value.

    If there are multiple data sources on a single report, follow the instructions above for each data source and create visibility expressions for the data elements that display the names to control which name(s) are displayed.

    Warning No formatter is installed for the format ipb
  • Works like a charm, thanks! :)