Normal Topic [solved] @XResultSetPrintRecord (Read 325 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
[solved] @XResultSetPrintRecord
Jul 26th, 2009 at 7:21am
Print Post Print Post  
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]
« Last Edit: Jul 26th, 2009 at 4:03pm by lksseven »  

Larry
Back to top
IP Logged