Hide chart in reporting on 'no data'

Goodday everybody,

Could anybody help me with the following:
I am creating a report with some basic graphs, now for some situations there would be no data on that graph so it would display “No Data” (default message).
I would like to toggle the visibility of the graph on this message, so if there is no data to display hide the complete graph.

I think this could be done by creating a script function on this graph but i don’t have the any idea what parameters to call in this script, any help would be highly appreciated!

You could drive the ‘Visible’ property of the chart off of the count of data in the datasource. Right click the ‘Visible’ property, select ‘Use Dynamic Data Key’, then populate the data_key field with count. This will toggle the visibility of the entire chart whenever the datasource has no result rows.

1 Like

Thanks Paul,
that is one quick and easy way to do it!

I had no idea this was even possible!

Are there limitations as to what can be made visible? I tried to apply this to the visibility of a table in a table group and found that the table wouldn't show up when there were rows in the data source for that particular table.

I have no idea. If you can make a reproducible sample case, you should send it in to the support department.

I got it figured out this morning. For that table in the tablegroup, I had to add the name of the datasource before count for it to work. For example, the datasource I'm using is a scripting datasource I've called speedSensor. So the dynamic key on Visible needed to be speedSensor.count. It works fine now.

1 Like