I'm trying to grab a result set of records from SOLines, and sorted by date and sales order number, and print previewed in a browser. I searched archives and tried to mimic suggestions by Hammer and Carl - my code gathers and sorts the result set fine, but I can't get it to then bounce up an html preview. the code is in a 'custom menu form' command button Reports::On Element Entry (I inserted the vPrt line as it works fine when I run the report from a button that is 'in' SOLines form ... I'm thrashing around, obviously) ... I subbed hashes ("-") instead of underscores ("_") in the report name, and that did the trick! Yea! Now I can get outside for the rest of the weekend!!!)
[size=8]vRS5 = @XResultSetSearch(@FN, "Orders!SOLines", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, "!ClientID=" + vClientID, "!SODate=" + vDateRange)
vTot = @XResultSetTotal(vRS5) writeln(vTot) If vRS5 > -1 { vTot = @XResultSetTotal(vRS5) writeln(vTot) XResultSetSort(vRS5, "SODate:-1;SONum:-1") vRpt = @XResultSetPrintReport("Client[color=#ff0000]-[/color]BySODate[color=#ff0000]-[/color]Ascend", vRS5, REPORT_MODE_HTML_PREVIEW) writeln(vRpt) vPrt = @PrintAReport("Client_BySODate_Ascend", REPORT_MODE_HTML_PREVIEW, PRINT_ORIENTATION_LANDSCAPE, 0, -1, -1, -1, -1, -1, -1) }[/size][color=#ff0000][/color]
|