I've tested with a unitimer. Launch the report in a separated thread, and enable the timer. In the ontimer event, I control if the thread is terminated or not. If yes, disable the timer and sendfile. This work fine, but only in standalone (unitimer is for client side).
Now, trying to use unithreadtimer.
Launch the report, and do this:
unithreadtimer1.enabled := true;
if UniThread1.terminated then begin
UniSession.SendFile(UniServerModule.StartPath + 'files\tmp\' + xreport2,xreport2);
unithreadtimer1.enabled := false;
This should work, but don't work.