Export multiple reports to Excel - c#

I have a c# windows form that opens up a report viewer (using visual studio reports). The first report shown is an overview report displaying various figures split by year. Each year can then be clicked on and a drill through report is opened up passing the date as a parameter where a more detailed view is shown.
Is there a way of exporting this overview report and its drill through reports to one excel workbook with the reports separated as worksheets? I can save each report separately but I need the option of saving them all to one workbook automatically. So the excel file looks essentially the same as it does on the report viewer. I've searched everywhere and not found a clear solution.
Any help is much appreciated.

I don't believe it, u probably will need to write you own xls writer to make it work.

Related

How to open a report viewed in report viewer in excel without saving it first in VS2010 C#

I am building an application in c# using Visual studio 2010 with access database. I am using reportviewer of visual studio to view the reports which is working fine for me.
It has option to export your report in excel, PDF or word which needs to be saved first and then could be opened. But I want to open that report in excel without having to save it first.
I don't know if it is possible or not if it is kindly show me how? I will paste some pictures how it works
Here in the first step you will have to click on the export into one of the three
Then you would need to save the report
After saving, you can than open the report in excel, PDF or word but I would like to skip the second step of saving it and directly open it in excel.
You can handle ReportExport event of ReportViewer and set e.Cancel=true; then using Render method of its LocalReport or ServerReport property, export it to desired location.
ReportViewer - Export report programmatically to a specific location without showing save dialog
save the file in TempFolder ... after it saved , you can open it directly:
System.Diagnostics.Process.Start(#"YOUR_PATH");

Best Way to generate excel report

Actually I'm asking this question because I want to know what is best solution for this base on what I only have. First let me show you what I really want to achieve. My boss want me to generate report in excel file (.xls or xlxs) then inside this report compose of multiple sheets with each respective sheet name. Data are presented in nice and professional way and sometime there are graphs inside that are link with the data within the sheet and it looks like this:
Below is what I only have to generate this output.
Visual Studio 2008
Sql Server 2008 (no SSRS)
Report is generated via
RDLC (naming of sheet is not possible for this but multiple sheet is
doable via pagebreak)
I try to update excel file via Sql Server but
seem too complicated for this specially when dealing with Total
fields.
I have not yet tried to render graph on .rdlc
It sounds like the data lives in SQL server. If you have access to it, why not create an ODBC connection and use this to pull raw data into each one of the sheets you need, and then configure a dashboard tab that automatically pulls data from those sheets (even if you refresh it) and shows the graphs and summary tables in the format that you want?

Microsoft Report Viewer Showing hidden columns on exporting to excel

I'm using Microsoft Report Viewer in an ASP.Net application on the 4.0 framework. I have the report showing fine inside the webpage, but I was recently requested to hide several columns. I found out that through editing the Column Visibility by right clicking on the column in the .RLDC file would allow me to hide it, but I need to be able to show the hidden columns upon Exporting to Excel. As far as I can tell Microsoft Report Viewer exports exactly what it has shown to Excel.
Does anyone know how to access or change the columns properties upon the export to excel click event on Microsoft Report Viewer 2010?
Your best bet is to add your own export functionality.
Set ShowExportButton="False" in the ReportViewer and add a new button in your page that hides the columns and then exports the report to excel.

Is there an easy way to give an option to open Excel on export form SSRS reportviewer control?

If we export to Excel from the ReportingServices reports web site, the user gets an option to Open/Save/Cancel. However, the reportviewer control for winforms does not give the Open option. The user has to save the file and then open it manually.
I'm wondering if someone else has already crossed this bridge and might be able to save me some time. I'm fairly confident that we could use some of the reportviewer events and add some office automation to open Excel. I was just hoping to avoid that.
Any ideas are appreciated.
One note, showing the RS web site in a browser window isn't really an option because we build the datasources programmatically and the the report is local, not on the RS server.
I think your best option is to automate the save and open through code. In short, save the report to the user's temp directory and then use the .Net call to start Excel as process; passing it the file path to the copy which was saved in the temp directory.
Hope this helps,
Bill

Can Crystal Reports be edited in a .Net Windows interface?

I am currently evaluating Crystal Reports 2008 for use within a major enterprise project. I have successfully used Crystal Reports Basic within Visual Studio, but we want more functionality. Can these reports be edited in a .Net Windows interface?
Reports will be produced based on ADO.NET Xml datasets and will be saved to a SQL Server db as blobs of the rpt files. We will be retrieving these rpt files for viewing within a .Net Windows application coded using Visual Studio 2008 in C#.
I need to produce letters that hide and show sections/paragraphs based on formulae, but the users want to be able to edit the text.
Once a report has been created and is being displayed within the .Net CrystalReportViewer control (inside a .Net Windows application), is there any way I could permit the user to alter the displayed text and re-save the rpt file?
I know that I can use parameters, but it's not ideal for large paragraphs of text which may include some words in bold for example. The users are only likely to be changing a few words, such as the addressee of the letter. They have insisted that they need to be able to change anything on the letter.
I also know that (with Crystal XI or 2008) I can export to EditableRTF which does not put the text in frames like the standard RichTextFormat export option. The .Net RichTextBox component does not show headers or footers, which is a pain. I can show the RTFs in Word (even though they miss out lines and boxes from the report, but that's another matter) but quite frankly I'm terrified of the stories of deploying Office interop components in .Net apps.
When Crystal displays a report in preview mode you can click on pararaphs and it knows that there is a 'field' there because it highlights the row(s) with a box. Is there any way we can just edit this text and save the report again?
I'm under pressure to produce an estimate for this area of work. Is it possible within Crystal?
You've got a really good handle on the capabilities of Crystal, and you're right - the idea of editing big chunks of report text "live" is going to be tough.
The "export to RTF" option might be workable, provided you can live with one-way generation (after you use Crystal to generate the report and start editing the output, you can't re-generate without losing your edits).
Have you considered something like OneNote or other XSLT-based solutions? It seems like your users want a lot of control over the generated output, so your design's going to have to factor that in. Maybe even generate output and then shoot it straight into a document management system so users' changes are tracked and controlled?

Categories

Resources