Solved

SSRS:  Options for Exporting

Posted on 2014-04-14
2
971 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

16 Experts available now in Live!

Get 1:1 Help Now