sql-server - 将 SSRS 报告导出为 CSV 格式时出现问题

标签 sql-server csv reporting-services export-to-csv ssrs-2012

我有很多 SSRS 报告,并且在将数据导出到 CSV 文件时都遇到相同的问题。 (从VS-2005升级到VS-2013)

我在标题上有一些组数据,同时根据条件显示数据,如下图所示:

enter image description here

将数据导出为 CSV 格式时,其标题数据也会与表格网格数据一起下载。就像下图所示(黄色阴影)

enter image description here

我实际上想将这些标题列与实际数据行合并,如下图所示:(黄色阴影)

enter image description here

已编辑:

我找到了一种从 CSV 中删除 header 值的解决方案。将 DataElementOutput 设置为 NoOutput(如下图所示)

enter image description here

但是仍然无法将这些 header 值合并到数据网格中。 预先感谢您

最佳答案

基于以下官方文档:

Redesigned CSV Data Renderer

In earlier versions of Reporting Services, when you exported a report to a CSV file format, the data was formatted in a way that preserved the way the data appeared on the report page. For matrix data regions, this resulted in a data format that was inconvenient to import into other applications in order to continue to work with the data.

In this release, when you export a report to a CSV file, you can choose between two supported formats: Default mode and Compliant mode. Default mode is optimized for Excel. Compliant mode is optimized for third-party applications.

The earlier format for CSV files is no longer available. However, for reports that do not use matrix data regions, you can use Compliant mode to get a file format closest to the earlier CSV file format.

看起来 SSRS 2005 CSV 渲染器在 SSRS 2008 R2 中经历了重大变化,支持了新功能。

解决方法

检查以下问题,他们是否提供了添加旧 csv 渲染器的报告服务扩展:

引用资料和有用的链接

关于sql-server - 将 SSRS 报告导出为 CSV 格式时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55176293/

相关文章:

sql - 为什么 CREATE PROCEDURE 命令中允许使用 DEFAULT 关键字

sql-server - 如何减去两种情况的结果的两个别名

php - 添加 1 行计数器并使用 php 中的 fputcsv 首先更改最后一个 header

IE 中的 ReportViewer 滚动问题

.NET:SqlDataReader.Close 或 .Dispose 导致超时过期异常

c# - 允许将空日期时间输入数据库吗?

php - 如何使用php在csv文件中写入2个数组

Python csv.reader 自动转换 ISO 日期?

sql-server - 管理员无法管理 sql server 报告服务

sql - RDLC 表达式导致#error