Hi All,
I am trying to export some sales line through a dataport but its now working. The data is being filtered properly. I have written the following code.
RecSalesLine.RESET;
RecSalesLine.SETCURRENTKEY("Document No.");
RecSalesLine.SETRANGE("Document Type","Document Type");
RecSalesLine.SETRANGE("Document No.","No.");
IF RecSalesLine.FINDFIRST THEN
RecSalesLine.CALCFIELDS("Reservation Collected","Quantity Collected");
IF RecSalesLine."Reservation Collected" THEN
REPEAT
ResStatus.SETTABLEVIEW(RecSalesLine);
RetailSetup.GET;
xAutoFileName := RetailSetup."Magento File Export Path" +'ORDER-'+"Sales Header"."No."+'.csv';
ResStatus.MakeFileName(xAutoFileName);
ResStatus.RUN;
UNTIL RecSalesLine.NEXT = 0;
I am calling this dataport through Sales Header dataitem of a report. Can someone help me??
0
Answers
I need a one file per order. Please help!!
To me this looks like bad/weird design in your addon or just wrong code.
Also you never stated what kind of error occured / what went wrong.
Thanks for the suggestion. Got through it. exported the data using outstream.