Reporting service to export CSV

  • Hi,

    I am using SSRS to create a report. When this report is exported to a CSV file, it must make all columns the same width.

    So I am looking at creating a fixed-width column CSV file. I have created all the columns in the design view with the same width in centimeters - but this of course has not affect in a CSV's column widths.

    So when you open the file in Notepad it will look something like this: (each column being 10 chars in width)

    abc ,12345 ,a1b2c3d4e5

    adhffg ,9876 ,kjkdkd

    asdfoplk ,84749 ,jjhtkjfll

    How can this be done?

  • Unfortunatelly I don't think RS export works that way.

    You can try altering your dataset.

    Select (Cast Col1 as char(100)) as Col1, Cast(Col2 as char(25)) as Col2.....

    From Mytable

  • Thanks - I tried your suggestion -works just fine.

    Appreciate it!!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply