Howdy! I'm not sure if you can do what you want or not but you could probably do a couple different things that might work... Here's an idea you might try if no one offers anything quicker and easier...
dummy blank records; you could probably temporarily add dummy blank records (correct number based on user-input field before script is run) before print step is reached and then delete the dummy records when the print job has been completed; or better yet, just make about 30 blank records ahead of time just for printing and just have your script "tag" the appropriate number needed for the particular print job...
find dummy blank records (30)
change tag field to YES on desired quantity from user input field
find tagged records in 1 search request and your other records in a second request
sort appropriately so the blanks are in front
print
find dummy blank records (either all or the ones tagged)
reset tagged field to blank for next use
I haven't actually done this, but I think the logic is sound. Hope it helps!
--ST