Printing from Option buttons

If you have specific questions regarding the Professional Edition of Quartam Reports, this is the place to get answers from your fellow users of Quartam Reports - Professional Edition for LiveCode.
Post Reply
arkstar
Posts: 1
Joined: Wed Aug 11, 2010 12:26 pm

Printing from Option buttons

Post by arkstar » Wed Aug 11, 2010 12:28 pm

When I print a report, i get the line number from an option button rather than the label.
Any ideas?

thanks!
Rob

JanSchenkel
Site Admin
Posts: 110
Joined: Sun Jul 18, 2010 5:21 pm
Location: Aalst, Belgium
Contact:

Re: Printing from Option buttons

Post by JanSchenkel » Thu Aug 12, 2010 9:41 pm

Hi Rob,

What you see on the report depends on the data field expression, of course :-)
If you're printing data from a stack, using the qrtReports_PrintReportForStack command, you would use an expression of the form:

Code: Select all

the label of button "MyOptionButton"
If you're printing data from a database cursor, using the qrtReports_PrintReportForStack command, and the database column is an index number, the first solution that comes to mind, is storing the text of the option button into a global variable "gMyOptions", passing this variable as the fourth parameter

Code: Select all

qrtReports_PrintReportForCursor theLayoutFile, theCursorId, thePreviewFlag, "gMyOptions"
and then use an expression of the form:

Code: Select all

line theLineNumber of gMyOptions
If this doesn't do the trick, don't hesitate to elaborate and post extra questions!

Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com

Post Reply