Scripting in Reports

Hello ,

I have a strange issue with one of my reports.
I am trying to input by script some text in a html label from a data label. I put it on page ready, loading, ready, data change of a element from my report but it’s not working. It works only on click event.

I did something wrong?

My script is the following:

htmlLabel1.labelText=dataLabel1.control.container.textContent;
dataLabel1.hidden=true;

Thank you!

This inquiry has been forwarded to our Support Team and we are working on this offline. We will provide an update here in the Forums when we have a resolution.

The container’s text content is not populated on ready, since the ready event only accounts for the metric set data being loaded in, thus you are experiencing a race condition where the script is firing before that is set. However, there is a workaround – just use this instead:

htmlLabel1.labelText=dataLabel1.metricSetBindings[0].dataResult.cellset.rows[0].members[0].caption;

dataLabel1.hidden=true;

This should work on dashboard ready

1 Like