Showing posts with label csv. Show all posts
Showing posts with label csv. Show all posts

Monday, March 26, 2012

Reporting Services 2005 - export to CSV with no header

I have a very simple table report. I need to be able to export it as a CSV, but I can not have the first line being the header. I need just the data and no header. Is there a way to do this? I tried working with the Output tab on the tables properties, but I only seem to be able to include or exclude columns not the column headers.

I look forward to you response.

FredZilz

Hello,

To do this you need to set the DeviceInfo parameter "NoHeader" to True:

http://msdn2.microsoft.com/en-us/library/ms155365.aspx

-Chris

|||

Excellent, I can now get my results using URL Access.

Can, I set Device information settings as the default for a particular report (not at the server level but at the report)?

Thanks

|||

Hello,

DeviceInfo parameters can be set 1) via URL access, 2) when rendering with the SOAP API, or 3) set in the report server config file for the entire server (all reports).

However, they cannot be set as default for particular reports.

-Chris

Reporting Services 2005 - CSV - ASCII - £(Pound symbol)

Hi

We are having problems getting Reporting Services 2005 to export to an ASCII CSV file and correctly produce a £(GBP sign).

I have changed my report server .config file to read:

<Extension Name="CSV1" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<OverrideNames>
<Name Language="en-UK">CSV - UTF-8</Name>
</OverrideNames>
<Configuration>
<DeviceInfo>
<Encoding>UTF-8</Encoding>
</DeviceInfo>
</Configuration>
</Extension>
<Extension Name="CSV2" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<OverrideNames>
<Name Language="en-UK">CSV - UTF-7</Name>
</OverrideNames>
<Configuration>
<DeviceInfo>
<Encoding>UTF-7</Encoding>
</DeviceInfo>
</Configuration>
</Extension>
<Extension Name="CSV3" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<OverrideNames>
<Name Language="en-UK">CSV - ASCII</Name>
</OverrideNames>
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
</DeviceInfo>
</Configuration>
</Extension>

And so far so good I get the three options to export to,

If I Export using the ASCII Rendering my pound signs come out as question marks (?) and subsequently loads into Excel as a general data type and is not sum-able.

If I Export using UTF-8 Rendering my pound signs come out as a weird character followed by a pound sign, again opened in excel loads as a General data type and is not summable.

If I export using UNICODE rendering, by file sizes are doublesd as you would expect, and then when you open in excel it is all bunched up in column 1, both un-acceptable.

Interestingly enough If I take the UTF-8 file I have and convert it to ASCII using Ultraedit, notepad or wordpad, everything works fine, the £ is correctly encoded, Excel loads it OK and it is summable, result, but I can not use get my end users to perform this "kludge" for an export.

Any help would be appreciated

Thanks

Tim

Hi Tim,

Excel, for some reason, has a problem opening comma separated files with Unicode encoding. This is why you are seeing all of the columns smashed together. In order to get Excel to properly open a Unicode file you should switch to using a tab delimiter. Unfortunately due to a product issue, tab delimiters are not settable in the server configuration file. They are settable when rendering using the URL. Example:

http://server/reportserver/?/myreport&rs:Command=Render&rs:Format=CSV&rc:FieldDelimiter=%09

As for the pound symbol being interpreted as text, I find that if I switch my machine to a en-UK locale this works fine. I can repro your issue when my machine is en-US. Can you verify this?

Thanks,
Chris

|||

Thanks for the pointers here.

Unicode is not ideal for us due the doubling of file size, and we are not using the URL method of rendering so tab delimited is out.

So on to your other comments, I have been trying all morning to make it not produce a ? (question mark)

1. The Local of the machine is definately en-UK, this is the only loaded local
2. The language property of the report in Report designer was set to English (United States), thought I had found it : )

But this changed to English(United Kingdom) re-deployed IIS reset and re-run, exactly the same ? instead of £ when exporting to ASCII, and odd character then £ in UTF-8

Out of interest the way we have forced the display of the £ symbol is using the Format property in report designer setting it to : £#,##0.00;(£#,##0.00)

I am interested how you have managed to re-create by changing the locale ?

Thanks for your help

Tim

Wednesday, March 7, 2012

Reporting Service 2000 Rendering Extension. Changing Default Opti

Hi Everyone,
I'm having an issue with the CSV export in Reporting Services. The default
encoding for CSV doesn't work the best in Excel. I would like to change the
default encoding type for CSV to ASCII. It this possible?
Thanks
ChadYes it is. You need to alter the RSReportServer.config file for the CSV
rendering extension.
By default, the CSV export is in unicode, to export as ASCII then you'll
need to add some deviceinfo for the CSV rendering as follows :
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
</DeviceInfo>
</Configuration>
Hope this is what you were looking for.
Phil
"Chad" wrote:
> Hi Everyone,
> I'm having an issue with the CSV export in Reporting Services. The default
> encoding for CSV doesn't work the best in Excel. I would like to change the
> default encoding type for CSV to ASCII. It this possible?
> Thanks
> Chad