CreatePrintJob()
  • Daniel
    CreatePrintJob()

    by Daniel » Tue Oct 03, 2006 11:59 am

    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?
  • COBS Tech Support
    Posts:683
    Joined:Fri Sep 09, 2005 8:23 am

    by COBS Tech Support » Tue Oct 03, 2006 12:02 pm

    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)

Who is online

Users browsing this forum: No registered users and 2 guests