Findset in sales order list

AitorEGAitorEG Posts: 303Member
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

Comments

  • lubostlubost Posts: 555Member
    1. Check customizations
    2. Which part returns empty rowset?
    3. Posting can move orders to archive and second part can not find previous selection (should be same from all clients)
    4. Try to post and print in one transaction by modifying BatchPostReport.
  • AitorEGAitorEG Posts: 303Member
    Thanks for your answer,

    I've jsut talk to our customer. The issue is that he's not runningdireclty from the page, it's running from a view he has created with different filter, just to show a few rders. Probably is an issue with those filters.....
  • vaprogvaprog Posts: 927Member
    Does your customer select the records he wants to print? Just setting the filters is not enough given the code used.
  • AitorEGAitorEG Posts: 303Member
    Yes, he's selecting the orders that must be registererd and printed.
    As I've said in my previous message, it was a problem of the view, it wasn't executing in the page. I think I've solved deleting in the code the filters from that view.
Sign In or Register to comment.