Solved

SSRS:  Options for Exporting

Posted on 2014-04-14
2
966 Views
Last Modified: 2014-04-15
Hello:

Although it might seem more logical to use SSIS instead of SSRS for this project, I'm going to use SSRS.

Ultimately, what I'd like to do--once I have my report created--is to export the data from SSRS to a text file.

I know that there is no such direct export available.  So, I will export to Excel and then save the Excel spreadsheet as a text file.

Now, the SSRS report is going to be pulling from at least one view in the SQL database.  And, that view is going to format fields to contain column lengths.  Retaining these column lengths is very important.

So, if I export to Excel and then save as text, will the column length formatting be saved?

Thanks!

TBSupport
0
Comment
Question by:TBSupport
2 Comments
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 39999659
I do not think so, in excel your text formating normally uses a delimiter between the data columns, no fixed lengths .
One way is to build a VB or C# net app that will read the SSRS field (which is only a XML formated file) and have it rewrite to a new file in a text format.
0
 
LVL 1

Author Comment

by:TBSupport
ID: 40000057
Update:  Since posting this, I found the following:

http://seanmkrause.com/2012/10/09/sql-server-2008-r2-tab-exports/

Ultimately, I want to be able to export from SSRS directly to a text file.  Aside from having to rename the extension to .txt, the URL that I just pasted above sounds like I can do so.

Specifically, the programming for one of report's views in SQL contains measurements for most of the fields as shown here:

SELECT
'MED' as company,
CAST('000HEADER' as CHAR(15)) as rectype,
CAST('' as CHAR(91)) as filler,
CAST('02.00' as CHAR(5)) as version,
CAST('16860' as CHAR(5)) as id,
CAST('EMPLOYER' as CHAR(20)) as type,
CAST('I' as CHAR(1)) as code,
CAST('' as CHAR(5)) as source_service,
CAST('' as CHAR(1)) as empl_id_only,
CAST('' as CHAR(1)) as multiple_work_times

Update 2:  I just tried the instructions mentioned in the URL article that I pasted.  It did allow for the exporting directly to a tab-delimited file.  So, I saved this .csv file as a .txt file.  And, it saved my SQL fixed column lengths!  Good.  That's what I wanted.  

TBSupport
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now