Page 1 of 1

CreatePrintJob()

Posted: Tue Oct 03, 2006 11:59 am
by Daniel
I have a card file that I want to print from when the operator presses the save button. I've added the CreatePrintJob() function to the save event. How do I tell Visual Builder which record to print please?

Posted: Tue Oct 03, 2006 12:02 pm
by COBS Tech Support
Visual Builder automatically looks for the existence of a variable called StartRecord and will move directly to that record before printing starts, if it exists. So your syntax would be along these lines:

Declare cScript Type Character
cScript := "Declare StartRecord Type Number"
cScript := cScript + CHR(13) + CHR(10)
cScript := cScript + "StartRecord := " + NTrim(CardFile->(RECNO()))

CreatePrintJob("Mycard", cScript)