SSRS Text format

Jean-François Handfield 101 Reputation points
2021-01-14T16:11:32.087+00:00

Hi,

I'm currently converting Access report into SSRS reports and one of my issue is that they are creating txt file with some of the reports. As their is no export to text file in SSRS I'm exporting to CVS with the txt file which works great but I need to remove the header. Is there a way to do that easily in SSRS?

And my second question is in Access when the press one button 4 reports are saved to the desktop as text files. Is there a way to execute 4 differents dataset and create a text file for each?

Thank you

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,826 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 33,626 Reputation points
    2021-01-15T07:00:05.13+00:00

    Hi @Jean-François Handfield ,

    SSRS is able to export to text, please follow the below steps.

    1.Navigate to RSReportserver.config file:

    2.Backup the RSReportserver.config file before we modify it, open the RSReportserver.config file with Notepad format.

    3.In the <Render> section, add the new code for the CSV extension like this:
    <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
    <OverrideNames>
    <Name Language="en-US">TXT (Pipe Delimited Text File)</Name>
    </OverrideNames>
    <Configuration>
    <DeviceInfo>
    <FieldDelimiter>|</FieldDelimiter>
    <FileExtension>TXT</FileExtension>
    <NoHeader>true</NoHeader>
    </DeviceInfo>
    </Configuration>
    </Extension>

    4.Save the RSReportserver.config file.

    5.Restart the SSRS.

    The config file path should be like:

    In SQL Server Reporting Services 2016 or earlier: C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer

    In SQL Server Reporting Services 2017 later: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer

    In this way, the exported report will be displayed Pipe FieldDelimiter in .txt format.(If you don't want Pipe FieldDelimiter,just delete the bold part)

    For the second question is related with Access, I'd suggest that you may post the question to Access Forum for more professional advice.

    Regards,
    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    What can I do if my transaction log is full?--- Hot issues November

    How to convert Profiler trace into a SQL Server table -- Hot issues November

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Jean-François Handfield 101 Reputation points
    2021-01-15T14:39:54.61+00:00

    Thank you for the answer Zoe, it's greatly appreciated. As for the last question, it's more of a how can I reproduce that in SSRS. Once I open is there a way to auto-save that report ?? They don't really need to see the report, they only need it to generated and save on their desktop to be re-imported in another software.

    0 comments No comments

  2. Jean-François Handfield 101 Reputation points
    2021-01-15T16:38:12.567+00:00

    I tried your render method for my txt extension and this is what I have right now

    		<Render>  
    			<Extension Name="WORDOPENXML" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordOpenXmlRenderer.WordOpenXmlDocumentRenderer,Microsoft.ReportingServices.WordRendering" Visible="false"/>  
    			<Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering" Visible="false"/>  
    			<Extension Name="EXCELOPENXML" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering"/>  
    			<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" Visible="false"/>  
    			<Extension Name="PPTX" Type="Microsoft.ReportingServices.Rendering.PowerPointRendering.PptxRenderingExtension,Microsoft.ReportingServices.PowerPointRendering"/>  
    			<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering"/>  
    			<Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering"/>  
    			<Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering">  
    				<Configuration>  
    					<DeviceInfo>  
    						<DataVisualizationFitSizing>Approximate</DataVisualizationFitSizing>  
    					</DeviceInfo>  
    				</Configuration>  
    			</Extension>  
    			<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>  
    			<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/>  
    			<Extension Name="ATOM" Type="Microsoft.ReportingServices.Rendering.DataRenderer.AtomDataReport,Microsoft.ReportingServices.DataRendering"/>  
    			<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/>  
    			<Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="false"/>  
    			<Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false">  
    				<Configuration>  
    					<DeviceInfo>  
    						<DataVisualizationFitSizing>Approximate</DataVisualizationFitSizing>  
    					</DeviceInfo>  
    				</Configuration>  
    			</Extension>  
    			<Extension Name="HTML5" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html5RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false">  
    				<Configuration>  
    					<DeviceInfo>  
    						<DataVisualizationFitSizing>Approximate</DataVisualizationFitSizing>  
    					</DeviceInfo>  
    				</Configuration>  
    			</Extension>  
    			<Extension Name="RPL" Type="Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering" Visible="false" LogAllExecutionRequests="false"/>  
    			<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">  
    				<OverrideNames>  
    					<Name Language="en-US">TXT (Pipe Delimited Text File)</Name>  
    				</OverrideNames>  
    				<Configuration>  
    					<DeviceInfo>  
    						<FieldDelimiter>|</FieldDelimiter>  
    						<FileExtension>TXT</FileExtension>  
    						<NoHeader>true</NoHeader>  
    					</DeviceInfo>  
    				</Configuration>  
    			</Extension>  
    		</Render>  
    

    For some reason I still don't see the option on my server, even after a reboot of the server.

    57271-ssrs.png

    0 comments No comments

  3. ZoeHui-MSFT 33,626 Reputation points
    2021-01-18T07:14:06.567+00:00

    Hi @Jean-François Handfield ,

    It should be work cause it's fine in my PC.

    Please ensure that you have modified the correct RSReportserver.config file of the SSRS you are using.

    Also ensure the code has been added to the RSReportserver.config file not the back up of the file.

    Or you may also refer this for help.

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1dc5712f-642d-469a-93ca-85bd48818a65/ssrs-export-to-text-and-nothing-but-text?forum=sqlreportingservices

    For the second question, not really clear for your requirement and SSRS has a function of snapshot.

    Report snapshots are processed on a schedule and then saved to a report server. If you want to save the reports to local, you may also use e-mail or file share subscription for a try. If I misunderstand your needs please incorrect me.

    add-a-snapshot-to-report-history-report-manager

    create-and-manage-subscriptions-for-native-mode-report-servers

    Regards,
    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Jean-François Handfield 101 Reputation points
    2021-01-18T14:10:18.34+00:00

    Hey Zoe,

    I think I figured out the problem with your solution. I modified your initial solution from : <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"> to <Extension Name="TXT" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"> and now I see it in the export window.

    Thank you for your help and have a great day.

    0 comments No comments