hi,
Bibhu's code will work for you. If you also want to avoid the user to print it using other options like through menu -> print, then use this code in the form:pre-print event:
if (Total.rawValue < 1000)
{
app.alert("Please try again");
xfa.event.cancelAction = true;
}
else
{
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
}
Regards,
Chaitanya