Something I’m just not seeing…
I loop through a found set and grab the correct number of labels… the but last label never prints. I watch the printer dialog box and it’s always one short of the foundset.
Has anyone else had issue with this?
globals.gWarehouseBox = the number of labels set by the user on the form.
var defaultPrinter = globals.gCurrentPrinter
if(defaultPrinter)
{
forms.Shipping_Label_Print_Screen.controller.setPreferredPrinter(defaultPrinter)var set = forms.Shipping_Labels_Boxes.foundset;
for ( var i = 1 ; i <= set.getSize() ; i++ )
{
var record = set.getRecord(i)record.shipping_label = full_address_calc + "Description: " + record.description + “\n” + "BOX " + record.box_number + “(” + i + " of " + set.getSize() + “)”
}
forms.Shipping_Label_Print_Screen.controller.loadRecords(forms.Shipping_Labels_Boxes.foundset);
forms.Shipping_Label_Print_Screen.controller.print(false, false);globals.dialog_info_dynamic(‘Your ’ + globals.gWarehouseBox + ’ label(s) have been spooled\nto the printer "’ + defaultPrinter + ‘"’);
}
else
{
globals.dialog_info_dynamic(‘You must specify a printer.’);
}
} else {
controller.readOnly = true
}