Solved

SSRS:  Options for Exporting

Posted on 2014-04-14
2
984 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Job - date manual 1 42
Reformat SQL - so SSRS can read the columns 25 33
SQL QUERY 3 33
SQL Query Across Multiple Tables - Help 5 22
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 I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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