Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Add row if the table row count is 0
Migrateduser
<p>Hello,</p>
<p>I've got the report with report parameters startDate and endDate. In some cases the table may be empty(e.g. time period is too short). So in report only headers of the table are shown. I want to add a row in this empty table with message in one cell, e.g. "There is no data for this period" or something like this.</p>
<p>How can I do that?</p>
<p> </p>
<p>I tried to add condition in fetch() script like this</p>
<pre class="_prettyXprint _lang-nocode">
if (totalrows == 0) {
row["serviceName"] = "There is no data";
return(true);
}
if (currentrow >= totalrows) {
return(false);
}
var rowValue = resultInfo.get(currentrow);
row["serviceName"] = rowValue[0];
row["ogvName"] = rowValue[1];
row["ddl"] = rowValue[2];
row["avgTime"] = rowValue[3];
row["countPs"] = rowValue[4];
currentrow = currentrow + 1;
return(true);
</pre>
<p>but it doesn't work. Is any simple solution for this problem?</p>
Find more posts tagged with
Comments
There are no comments yet