Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Reporting : Addition of Custom Delimiters Expand / Collapse
Author
Message
Posted Friday, September 21, 2012 10:06 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 19, 2013 4:33 PM
Points: 43, Visits: 154
Is it possible to add custom delimiter of ! in Text file in Sql Server Reporting Services.

My requirement is to export the data in text file with Custom Delimiter ! from Reporting Services.

Any help or idea to achieve above task is appreciated.

Thank you in advance.
Post #1362817
Posted Sunday, September 23, 2012 10:59 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:12 PM
Points: 2,916, Visits: 2,515
You can do this by adding a custom renderer to reporting services based on the existing CSV renderer.

To do this you need to edit the reporting services config file "rsreportserver.config" (make sure you backup it up before you start). The file is located in a folder similar to
C:\Program Files\Microsoft SQL Server\MSRS10_50.SQL2008R2\Reporting Services\ReportServer\bin

Open the file (e.g. with notepad). Towards the end of the file, you will see the "Render" tags followed by the various renderers (as "Extension" tags).

Find the CSV extension. It should look something like :
<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>


Copy this line as a new line. Change the name to something unique. Remove the / from the end of the line.
Add a closing tag for the "Extension" tag.

Add the following between the opening and closing Extension tags:
<OverrideNames>
<Name Language="en-us">MyDelimiter</Name>
</OverrideNames>
<Configuration>
<DeviceInfo>
<FieldDelimiter>!</FieldDelimiter>
</DeviceInfo>
</Configuration>
Save the changes and restart the reporting services services.

You should now have a new option when you save the report (with the above, you would see "MyDelimiter" as one of the options you can pick from when you save a report.






Post #1363327
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse