Solved

SSRS:  Options for Exporting

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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