Download Multiple File Failed (Using Stream)

julkifli33julkifli33 Member Posts: 1,092
Hi All,
i want to generate file using stream
but if i use repeat , in order to generate multiple files, it will generate the last one only
any advise?

here is my code
procedure GenerateFile()
var
GJL : Record "Gen. Journal Line";
begin 
GJL.Reset;
if GJL.findset then
repeat
    DownloadFile(GJL."Document No.");
until GJL.next = 0;

end;


 procedure DownloadFile(DocNo:Code[20)
    var
        FileExportedName: Text;
        InStream: InStream;
        OutStream: OutStream;
        TempBlob: Codeunit "Temp Blob";
    begin
            FileExportedName := DocNo;
            TempBlob.CreateInStream(InStream);
            DownloadFromStream(InStream, '', '', '', FileExportedName);
    end;

Best Answer

  • JJMcJJMc Member Posts: 60
    Answer ✓
    Yo can also launch a window simple to accept something after each file, so the user needs to press, and you'll get each file.

Answers

Sign In or Register to comment.