Hi everyone,
I've included a button into the sales order list, to ship all the selected ordes, and send them to a printer. The code is this one:
//1890107-01 CurrPage.SETSELECTIONFILTER(SalesOrder); CurrPage.SETSELECTIONFILTER(lSalesOrder2); //lSalesOrder2.COPYFILTERS(SalesOrder); IF SalesOrder.FINDSET THEN BEGIN CLEAR(BillToCust); BillToCust.GET(SalesOrder."Bill-to Customer No."); CLEAR(BatchPostReport); BatchPostReport.SETTABLEVIEW(SalesOrder); BatchPostReport.InitializeRequest(TRUE,FALSE,WORKDATE,TRUE,TRUE,TRUE); BatchPostReport.RUNMODAL(); CLEAR(BatchPostReport); COMMIT; END; //imprimir //CurrPage.SETSELECTIONFILTER(SalesOrder); IF lSalesOrder2.FINDSET THEN REPEAT //lSalesOrder2.CALCFIELDS(Shipped); //IF Shipped THEN SalesPostPrint.Print(lSalesOrder2); UNTIL lSalesOrder2.NEXT =0;
If I run it from the server, works correclty. But the problem comes when we run it from a client´s laptop. If we just select one order, the findset for printing works correctly. But if we select more than 1 order, the findset isn't "finding anything".
I'm really suspreised because the behavior is different if I run the develepment in the server or in a laptop....
Any hint? Thank you very much