remove dataset records if null on fetch

BirtRepUser
edited February 11, 2022 in Analytics #1

When I write the following code on fetch for dataset

var tmpArray = reportContext.getPersistentGlobalVariable("timeValues");
if (tmpArray.contains(row.Timeslice) == false && row.Timeslice != null)
{
tmpArray.add(row.Timeslice + '-'+row.GroupNo + '-'+ row.Type + '-'+ row.Value);
}

reportContext.setPersistentGlobalVariable("timeValues", tmpArray);

How to remove null

Comments