- Code: Select all
var dataset = arguments[0]; //taken from another foundset into the method
var ID = new Array(dataset.getMaxRowIndex()); //define array
for (var i = 1 ; i <= dataset.getMaxRowIndex(); i++)
{
if (i > 1)
controller.duplicateRecord(); //I duplicate this record if i > 1
ID[i-1] = lettersid; //add the id to the array
}
forms.lettersPrint.controller.loadRecords(ID); //call form/records based on arry
forms.lettersPrint.controller.print(false, true);//print records
I checked the dataset and the ID array. They both have 3 records in there but printing gives me all records...