I've got a report in 2016 that will either print a hard copy or output to Excel based on a checkbox in the Options tab presented to the user. The report layout has a body with a tablix, and a header. When I select output to Excel, I am able to prevent the data in the body from printing by simply doing a SKIP in the code behind the report. But it still prints one header. I don't see an easy way to prevent that header from printing. Is there a setting somewhere in the header that I can't find that says "if you don't find any data coming through, don't print the header section" or something like that? I tried putting the header information into the tablix within a row that has all columns merged and put into an inserted rectangle there, but since the Page Number is included, it won't save the report since that can only be used in a header or footer section. I can probably tell the customer that they will just have to live with it, but it would be nice to prevent.
0
Answers
I believe whenever this type of requirement comes up we used to handle it with a FLAG only. Why dint you apply a visibility condition on the Tablix based on PRintExcel Flag that whenever its on VISIBILITY sets to off.
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/