1
votes

The report

The report consists of, in this order:

  • A header
  • A tablix containing the main data. It has one grouping containing the detail group.
  • A rectangle set to add a page break before. The rectangle contains text boxes with metadata.
  • A footer

The problem

When the report is exported to CSV the only data is the metadata from inside the rectangle. I need the data from the tablix.

Additional details

  • There are no visibility expressions set on the tablix, it's columns or rows, any individual text boxes, or groupings.
  • The report exports to excel (.xlsx) just fine.
  • The issue occurs on the report server and in SSDT locally.
1

1 Answers

1
votes

SSRS treats XLSX vs CSV exports quite differently. XLSX export is a layout renderer, where SSRS tries to be smart and mimic the layout of the reports into Excel. CSV export, on the other hand, is just a data renderer and SSRS doesn't care how the page is laid out, it simply tries to export data.

There are several reasons why the data renderers of XML and CSV might actually omit elements in your report.

  1. Static Values - Values that are hardcoded and don't change from row to row will not get exported.
  2. Items that are controlled by conditional expressions (even if they evaluate to false and should show) will not be exported. One of MS's many "by design", "nice" features :(

This all said, there is a property on elements called "DataElementOutput" that controls whether the specific item should be visible in a CSV/XML data export. Can you try setting this to "Output" for your tablix and see if that forces it to be shown?

enter image description here