Acebanner wrote on Aug 1
st, 2008 at 2:19pm:
Is there anyway to program Sesame to run the search behind the scenes, and then run the report? I'd rather not have my end users have to find the records first, and then select the report.
You could use @XResultSetPrintReport attached to a button on a custom menu (or anywhere you like, actually).
Here is an example of some code I have in a button, which is located on a custom menu. The user never sees the form at all.
var vRS as int
var vInvNo as string
var vReportFileName as string
var vList as string
vRS = @XResultSetSearch(@FN, "Products", 0, 2, "!BoxesInStock=>0")
If vRS > -1
{
vReportFileName = @XResultSetPrintReport("Inventory Sheet", vRS, 1)
XResultSetClose(vRS)
}
In this example, the report does NOT have any
retrieve specs attached -- that's handled by the last parameter in @XResultSetSearch. It just has
sort specs attached.