PrintOnlyIfDetail and exporting to excel

Hi everyone,

I am trying to customize standard report 709 so that I can export it to excel.In the dataitem Item, PrintOnlyIfDetails is set to Yes, so if there is no data the preview of the report is empty…
but the excel file I am generating is printing data (name and description of the items)…
How can I make sure that if the report preview is empty(no data), the excel file is empty as well???

Thanks in advanvce :)