I have an Oracle query and I want to export the query results to an excel file daily. I've looked into both SSRS and SSIS and am not sure which would be better to use.
The query is a normal select that returns 10-20 fields. It is pretty straight forward with a couple joins and where clauses. It selects DISTINCT to get rid of duplicate rows.
It's a straight mapping from the query to the excel file.
Does SSIS have performance advantages over SSRS?
I was leaning toward SSRS because it's very simple to set up and there are added benefits of being able to easily run our extract/report with different dates through the SSRS web UI.
SSIS seems like it will be more complex to set up, but still simple. However, it seems I would have to handle how to rename the extracts without using the main excel "template" so there are more steps involved. Also having issues getting parameters to work with Oracle queries.
Even though I am a big fan of SSIS, I would go with SSRS in this scenario.
Your requirement is that you simply need data in an Excel file. Though both SSIS and SSRS can do this task. SSRS has slight advantage in what you are trying to achieve.
You can format the Excel file in SSRS report however you would like to.
Similar to SSIS package that is easy to configure, SSRS also has easier development process. You can design and populate however you would like.
SSIS requires a SQL job to schedule it in order to run the package and then send you the Excel file or save it to some location. However in SSRS, you can simply create a subscription and export the Excel file to particular folder or send it to you in an email.
If you ever want to change the file export format, SSRS already does that for you.
Some of the points that I could think of.
This isn't a report, so don't use Reporting Services.
The SSIS package necessary for this is a single Data Flow task with two components: an "OLE DB Source" for your Oracle query, and an "Excel Destination". Draw a connection between the two components, configure them, press F5 and you're done.
Almost any property in SSIS can be set to the value of an expression. This includes the "ExcelFilePath" property of the Excel Connection Manager. Simply set that to an expression that appends the date to the file path, and you'll be set as long as you only run the package daily.
If you need to run it more than once a day, then simply precede the Data Flow task with a File System task to delete any previous version of the file.
Just tried this quickly myself and found one small issue. The data source I used included VARCHAR columns. The Excel Destination wanted Unicode, so I had to place a Data Conversion component between source and destination.
This link has a nice evaluation of the case you are presenting:
http://theruntime.com/blogs/gscarfone/archive/2009/07/15/data-dump-to-excel-through-ssis-and-ssrs.aspx
Basically it depends on your particular scenerio.
Hope it helps...
Related
I have a folder with around 15 reports in it, these are Report Server reports. To run each report individually will take a while, so I want them to run together. So, what I want to be able to do is somehow run all the reports in this folder, is this possible?
This is somewhat of an ambiguous question. Let me explain. What are you asking specifically?
Q: Can you run multiple reports at the same time?
A: Yes, and there are several ways to accomplish this.
1. You can use SQL agents
2. Use batch files with task scheduler
3. Use an SSIS package and use an agent to run them at specific times...etc...
Hopefully one of the reports does not depend on another and another thing that you have to take in to consideration is how hard you will be hitting the SSRS or SQL server. Running them all at one time may take longer than one at a time. depending on the bandwidth of the SQL Server and what tables are going to be locked up during each of these processes.
You might want to give a little more detail in your question...
I would recommend an SSIS package, especially as it also one of the options presented by #Michael that can email the Excel workbook too which you mentioned in an earlier comment.
The following resource covers quite well the execution and export of an SSRS report using SSIS, including code you will need as a starting point: Executing an SSRS Report from an SSIS Package.
You could save some time in coding the solution by using the following custom Task that can be integrated into SSIS: SSIS ReportGenerator Task.
There is one problem in your requirements though which is merging reports into one Excel workbook where I assume you want separate sheets for each report within the same workbook?
Reporting Services can use multiple worksheets (to divide a report up into pages a.k.a pagination) but only for a single report; it can't merge reports into one Excel file. This can be accomplished with custom code however. There's a somewhat basic example here: Merging workbooks into a master workbook with separate sheet for each file.
One way to run all the reports at once is to add subscription to all of them and set same subscription start time in all of the reports. what will happen is once the start time arrived all the reports will run simultaneously and will generate excel/pdf (any format specified) file at shared location.
I am calling reports through Data Driven Subscriptions. We are having very huge data (in millions). So the reports will be generating very large excel files.
We have provided download option to user for downloading created report excel files. But if file sizes are very huge, User is not able to dowload the files.
Does anyone have an idea how to split report data to multiple excel files. Does SSRS can handle it? After some size limit split data to next file. Like generate multiple files for same report call.
You can split the records into multiple shits by going to page break option in report properties.or you can go to tool tip and write custom expressipn there to how much data you want to see in one shit.
or you can use the help of SSIS to split the report into miltiple excel work book.
AFAIK there is no feature in SSRS that handles this.
You will have to roll your own solution: generate the report asynchronosly (or scheduled) server side, then create an application to distribute the files in seperate parts.
I am new to SSRS and I'm trying to automate a report for our client. I have comnpleted the design but I have not deployed it to the reporting server. When I manually export the report to excel via the design viewer in Business Intelligence Studio 2008, I get a new workbook every time. However, I want this report to export to excel automatically, to the same workbook, on the same worksheet, every time it is run per month. This way, i can create an excel workbook that contains the report data and other worksheets with templates that auto populate, based on the report data.
I'd like to avoid exporting it to a new workbook, then copying and pasting into the workbook with all my templates manually. I'd also like to avoid exporting to CSV or XML and then importing it into Excel.
Is this possible? Perhaps this is via the deployment of the report and I just haven't gotten that far?
Thanks!
Hi welcome to stack overflow.
Can l suggest looking at another related technology SSIS (Sql Server Integrated Services). This will allow you to extract the data from a data source. Then using the the out of the box components export the data to Excel. Once you have created the package in SSIS, the package can then be scheduled to run (if you have SQL server instance) to run at specific times. I have used that solution in my current role to produce reports automatically and then email then to various people.
The link below shows one method of exporting to excel using BIDS, and suggests some other ways.
http://cavemansblog.wordpress.com/2009/04/17/ssis-export-data-from-sql-server-2005-to-excel/
Also this link http://dougbert.com/blog/post/Excel-in-Integration-Services-Part-1-of-3-Connections-and-Components.aspx is one of three that covers the topic of connecting SSIS to Excel, has some excellent advice IMHO
SSRS has a scheduler build in, which can run reports at specified times, this l think is only available in the enterprise edition. This facility will if memory serves right, will not insert the data, only create or overwrite the file each time. So l am not sure if this is the solution you are looking for.
We have been provided a form, layed out in Excel, that needs to be filled in based on data we have sitting in our SQL database.
I'm trying to determine the best way to electronically fill the form in. I could create an SSRS report, and lay it out as close as possible to the form provided, but I was wondering if I could use the excel file as a template in SSIS and have SSIS fill in the various fields.
It is not a simple table spreadsheet.
Use an SSIS package, connect to your DB and do the transformations on the package itself, there are several components, I'm pretty sure you will be able to deal with all the situations.
You could use the report and save it as excel but I think will be more complicated.
One thing to consider is that SSRS has limitations when exporting to excel. There is a limit of 60k rows. If you try to export more you will get:
Excel Rendering Extension: Number of rows exceeds the maximum possible rows per sheet in this format; Rows Requested: 209048, Max Rows: 65536
There is a work around to this but its time consuming.
This is an excel 2003 limitation and SSRS 2008 cannot export to excel 2007
I need to create a report(rdl) in SQL reporting services 2008. In that I need to create in runtime. The report has chart. I will specify the type of chart, font, alignment and all those stuff in runtime.
Is there any option for using this in SSRS 2008.
An rdlc is just an xml file so you can manipulate it at runtime, it's not a trivial undertaking though. You can find the rdl spec at http://download.microsoft.com/download/6/5/7/6575f1c8-4607-48d2-941d-c69622e11c32/RDL_spec_08.pdf.
There's a downloadable example of creating an rdlc for a table and a matrix dynamically, as well as lots of other useful report viewer info at http://www.gotreportviewer.com/.
You can generate the RDL however you want, it is just an XML file. But you will only be able to run the report locally. To run on the server you would need to deploy the report first, as the server does not run the RDL files directly.
I suppose this is still possible, but it would be pretty slow, and the report would not appear in the report manager or anything before hand.
However, your probably making this problem more complicated than it needs to be. I have work on projects where we generated the RDL and deployed daily with a custom application, and it is almost always not worth it. There is usually a better way.
You can set almost all the parameters of the chart using expressions. The only thing that can't be set is the chart type, but there are ways to get around that as well. Like having all the chart types you need created on the page, but making all except the one you want visible.
Yes...
to do so, you will need to either have an existing rdl file to modify, or you need to completely generate it from code.
All the SSRS xml is stored in the database in a table called catalog. You'll have to use the GUID of that report to access it, or insert a new row creating a new report.
once you're done swapping out your report server xml, the report server will have a "new" report that you can then call via your web page, or via SSRS url parameters.
past that clean up the catalog table if you see the need to.
I'll be honest with you though, this is very far from best practice, best practice that I'm aware of would be to embed the data you need to display in your web page in the form of a widget.