SSRS CSV export issue

Arvind Singh Gusain 5 Reputation points
2023-08-25T13:16:20.0366667+00:00

I have a SSRS report with dynamic column and also Column display order is getting handle through parameter "ColumnOrder". Once I generate the report it works fine and based on column order it display columns on report. Once I export it to CSV format it ignore the "Column Order " and display all columns in sequence and also it ignore hide and show property of SSRS. Please Let me know if any one have any solution for the same. I am using SSRS 2019.

I have added screenshot of Column Order parameter and the CSV format output. In CSV output we are getting all available column in sequence 1 to last(32 Columns). It is ignoring the column order we have provided in parameter. whereas in Excel format we are getting the correct column order and correct no of columns.

Note: I have resolved the Column Header Name( I am getting the correct name instead of "Column1,Column2 and so on..) but the Column ordering issues still is there.User's image

CSV OutputUser's image

Excel Output.

User's image

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,955 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,836 questions
{count} vote

1 answer

Sort by: Most helpful
  1. AniyaTang-MSFT 12,341 Reputation points Microsoft Vendor
    2023-08-28T01:18:32.6866667+00:00

    Hi @Arvind Singh Gusain

    When SSRS exports the report as a CSV file, a CSV report has the following characteristics when rendered using the default settings:

    Formatting and layout are ignored.

    The following items are ignored during rendering:

    Page header

    Page footer

    Custom report items

    Line

    Image

    Rectangle

    Automatic subtotals

    The remaining report items are sorted, from top to bottom, then left to right.

    For more details, you can check this link: https://learn.microsoft.com/en-us/sql/reporting-services/report-builder/exporting-to-a-csv-file-report-builder-and-ssrs?view=sql-server-ver16.

    If the answer is helpful, please click Accept Answer and Up-Vote for the same. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya