How to count rows of report using visualize.js



I want to count the rows of my report using VIsualize.js. So that if rows < 1 then i can put "No Data Found" lable.

I am not using table structure. I have many sub reports in my main report.

kchavda's picture
Joined: Jun 15 2015 - 5:08am
Last seen: 3 years 8 months ago

1 Answer:


You may want to try passing total row numbers with $V{REPORT_COUNT}. If this is translated into a passable parameter within Studio then it could be used within the Visualize.js framework to indicate the row count. Keep in mind that the variable scope starts after the query has been executed.

If you can pass your calculation variable into a paramater it can then be easily passed into Visualize.js. In fact if you are only trying to discover if rows < 1 you can first do this calculation in a report variable and then pass a boolean paramater through Visualize.js to help aregister if the report has actual data.

Perhaps something like this two step process will work to pass values from main report variables to a sub dataset through paramaters.

1) Create a paramater ($P{x}) in your sub dataset with the same data type as the variable ($V{y}) data type you want to pass.

2) In the report component (table, list, charts, etc) using the sub dataset, add the paramater in the sub dataset to pass the values $V{y} through $P{x}.

Parameter: x

Expression: $V{y}

This will pass variable y to the sub dataset through its paramater x at run time when the report component is called.


dpetzold's picture
Joined: May 12 2014 - 10:47am
Last seen: 2 years 8 months ago