Problem in exporting SSRS report to CSV format - sql-server

I have many SSRS reports, and all are having same issue while exporting data into CSV files. (Upgraded from VS-2005 to VS-2013)
I have some GROUP data on header while displaying the data based on condition like shown in below image:
While exporting Data into CSV format, their header data also getting download along with table-grid data. just like shown in below image (yellow shaded)
I actually want to merge those header columns with the actual data row, like shown in below image: (Yellow shaded)
EDITED:
I have found one solution to remove Header values from CSV. As setting the DataElementOutput to NoOutput (Shown in below image)
But still, not able to merge those header values into Data-Grid.
Thank you in advance

Based on the following official documentation:
Breaking Changes in SQL Server Reporting Services
Redesigned CSV Data Renderer
In earlier versions of Reporting Services, when you exported a report to a CSV file format, the data was formatted in a way that preserved the way the data appeared on the report page. For matrix data regions, this resulted in a data format that was inconvenient to import into other applications in order to continue to work with the data.
In this release, when you export a report to a CSV file, you can choose between two supported formats: Default mode and Compliant mode. Default mode is optimized for Excel. Compliant mode is optimized for third-party applications.
The earlier format for CSV files is no longer available. However, for reports that do not use matrix data regions, you can use Compliant mode to get a file format closest to the earlier CSV file format.
It looks like that the SSRS 2005 CSV renderer has gone through major changes in SSRS 2008 R2 with the support for new features.
Workaround
Check the following question, were they provided an extension to reporting services that add the old csv renderer:
Force SSRS 2008 to use SSRS 2005 CSV rendering
References and helpful links
MSDN - How to force SSRS 2008R2 to use the SSRS 2005 CSV rendering mode
Reporting Service 2008 - CSV export
How do I export a SSRS matrix to CSV without losing the structure?

Related

Access to SQL Server BLOB Picture Format

I have an Access 2016 form where data entry users copy and paste pictures into a Bound Object Frame that is linked to a SQL Server 2016 varbinary(max). Pictures are copied from Snip and Sketch. When using Access, all is wonderful. Pictures can be seen, can be put in a report, and replaced, if needed.
The problem comes in when using SQL Server Reporting Services 2016. I have tried to get these pictures out, but I don't know if they're jpg, dib, bmp, tiff, or any other format, so my question is:
What format are pictures sent to SQL Server from Access?
The copy/paste option is great for data entry, but the need to have a web based (SSRS) delivery to the customer (manufacturing floor) is paramount, so if there's a better way to store these pictures in a controlled format so I can retrieve them in SSRS, that is a solution as well.

Sharepoint Integrated SSRS report excel export fails

When trying to export a report to excel, the web site loads for some time and I am getting "This page can’t be displayed. Make sure the web address is correct" error.
Here are some platform details:
SQL Server 2012 with SP2
Sharepoint 2013
SS Reporting Services with Sharepoint Integrated Mode
Windows Server 2012 R2
The report itself has 4-5 parameters, calling some views and one procedure, and displays 120K rows with 30 columns max. The whole report without filtering can execute in about 7 seconds in SSMS. SP website can display the results of rdl just fine, report displays fine and fast enough. I can also export the results to csv, xml, all 120K rows of it. But when it comes to exporting to excel, it gets stuck.
Now this is where it gets funny.
When called with some parameters or date filtering, the report comes out nice and easy and can be exported to excel without delay. I have tested with increasing number of rows and excel export works fine up to some 50K rows. The exported xlsx file is around 9MB. But when I increase the date range, excel export is timing out.
Now on to the things I tried.
Exporting to other formats work fine. Just EXCELOPENXML is not working.
Increasing the values of ProcessTimeout, ProcessTimeoutGcExtension and even adding DatabaseQueryTimeout keys in rsreportserver.config did not help.
Increase the values of executionTimeout and maxRequestLength keys in web.config also had no effect.
I restarted Reporting Server services after config changes.
I suspected the 10MB excel export bug in SQL 2012 but that should be resolved with SP2 which is applied in this system.
Also related, few minutes before displaying the error message, web site asks for a re-login to sharepoint site. That happens after a couple of minutes of hitting the excel export. I want to make sure everything is what is supposed to be in sql side before making any IIS config changes.
Any ideas?
A few days of trial and error later, I've found the cause of this issue.
The problem was in a column with an action property of "Go to URL" and the url was set by string concatenation expression, taking 4 parameters from the report fields. Apparently SSRS processes all few hundred K's of data all over again while exporting to excel.
The reason why csv and xml formats were able to process the same report, but excel throwing the timeout remains a mystery to me. All I can speculate is that excel renderer requires more process time to format the cells.
Another way to solve the issue might have been enabling the report snapshot, so report data would be consumed from the cache but I'm not sure excel export would still re-process the report or not.
I solved the issue by adding another column with the same data, but adding the expression below to column visibility property:
=(Globals!RenderFormat.Name="EXCELOPENXML")
So now, the string operations with the parameters are successfully processed to form the URL format in web view, but are not processed in excel renderer.
Hope this helps someone.

Why can't I see a powerpivot spreadsheet in regular excel

i received an excel workbook and opened it but could not see it unless I went into PowerPivot. Why? It is an XLSX file. I should be able to see it in regular excel.
PowerPivot data is saved within the XSLX file, but not in a regular spreadsheet. PowerPivot uses a different format for its data that is optimized for fast analysis of large data sets, but not for standard Excel operations like putting a formula somewhere into a cell etc. which you can do in normal Excel sheets.
Hence, these being different types of objects, you cannot see them at the same place when opening the Excel file.
If you have MS-Office 2003 or earlier goto the blow link and download and install the MS-Compatibility pack.
http://www.microsoft.com/downloads/details.aspx?FamilyId=941B3470-3AE9-4AEE-8F43-C6BB74CD1466&displaylang=en

Export data from sql server to excel using SSIS

First I will explain what is my requirement and then I will explain what I have done so far and what are all the helps I need...
I have to export data from sql server to excel sheet. The excel sheet will be like a standard template. If I run my project, the data from SQL Server should be inserted into a new excel file which should use that template and it should be created and saved into a new location. Also, generally we will use first row as header. But in my requirement, the template will have two or three rows header. So, the data should be inserted automatically from the third/fourth empty row.
I have done exporting data from sql server database to normal excel sheet with first row as header. I have also done exporting data from different tables into different sheets of the same excel file.
Any body please help out for the template format, creation of new excel file while running project and two or three rows as header.
I am using SQL Server 2005 and Visual Studio 2005.
Please help out...Thanks in advance...
If your export is to Excel 2007 or 2010 can you use EPPLUS to handle the Excel-files.
You can solve this using SSRS.
Create your report how it has to look like.
Then deploy it on a reporting server web.
Then create a subscription where you export the report to a excel file. You can setup location and time it has to run.
THe report can look like however you need it.

how can i get data from excel via "select statement" in sql 2005?

is there any method to get data from excel to sql ? i think that we can do without any writing C#codes. For example : select * from MyExcellFile.xls.Sheet1. Or may be any wizard in sql?
See if this page with example of using OPENDATASOURCE helps.
EDIT: Towards the bottom of the page, you will see an example of a query that uses excel as its source.
You can save your EXCEL file as CSV file, and then you can use the following site in order to TRANSFORM the CSV file into a succession of INSERT statements:
http://csv2sql.evandavey.com/
(FREE Online CSV to SQL Converter)
Please be careful to avoid submitting sensitive data to the site, for obvious privacy reasons.
Easiest way is via the SSIS/DTS wizard. Right click on the database in SQL Server, choose Tasks then Import Data. One of the source data options is an Excel spreadsheet. You can them import it into it's own table in SQL Server or map the columns into existing tables. This is the easiest way for a one time upload.

Resources