title: SSRS Collapsed (hidden) rows still show up when exporting
body: <p>I am writing a SSRS 2005 report in BIDS 2008 which has recursive grouping and a visibility toggle. Initial toggle state is false, so all detail rows are hidden. When I view the report in the preview window, it shows up correctly, similar to below.</p>
  
  <pre><code>+Group 1
  +Group 2
  +Group 3
  </code></pre>
  
  <p>However, when I switch to print layout or export the report, the first group will always show up as expanded like below.</p>
  
  <pre><code>Group 1
      Detail 1
      Detail 2
  Group 2
  Group 3
  </code></pre>
  
  <p>So far I've tried using a different set of data in case it was caching the results and their expand/collapse status. I've also tried deleting and then recreating the group. I've even tried creating an entirely new report project and recreating everything. All to no avail.  </p>
  
  <p>Has anyone encountered this before and been able to fix it?</p>
  
  <p>EDIT:</p>
  
  <p>I set this report aside for a few days and came back to it this morning. I started a new report and slowly rebuilt it, changing a few values each time and checking to see if the issue popped up. What I found was that the first group does not get expanded when exporting until you add a header/footer to the report. As soon as you do, the export starts to expand the group.</p>
  
  <p>Further, the header/footer only causes the issue when one of them has an expression, parameter, or built-in field (execution time, for example). If the header and footer are made up of only static values (i.e. "Report Title"), then everything works fine.</p>
  
  <p>For example, I added a header with a single textbox. In the textbox, I typed in "Report Name". When I tested it, the issue did not occur and the groups remained collapsed. I then went back and changed the value of the textbox to '="Report Name"'. This time the issue did occur and the first group expanded automatically.</p>
  
  <p>So, my question is now why does using dynamic data in the header/footer cause the print layout view/export to completely expand the first group and all of its sub-groups?</p>