Wait until PrintOperation finishs in some way

Because we are using a thread to generate the report, the connection could be
closed before it's totally generated.
To work around this, wait until PrintOperation is sendingdata/finished/aborted.

Change-Id: Ieb3d3627a72108695aec490e1435fd5903e98adc