Integrated Application Platform › Forums › General › Printing from a button › Re: Re: Printing from a button
You’re very close.
– bill_num: bill_num needs to be inside the Object (just move it up one line)
– it needs to be Bill_num: bill_num to make it public so it can be accessed inside the QueryFormat class
– in the query it should be just .Bill_num
Or alternately you could do Data: Object(bill_num: bill_num) and then reference it as .Data.bill_num
Also, I would get in the habit of using Display when merging values into queries
“bol where bill_num is ” $ Display(.Bill_num) $ ” sort bill_num”
This ensures that the value is quoted if it’s a string. This isn’t strictly necessary if the value is a number, but it prevents the equivalent of SQL injection issues.