I was given an Excel template and have to automate filling it.
It is supposed to be uploaded every month into the grand central DB of our company. Grand central accepts nothing other than an Excel file with that template.
I tried reproducing the same using SSRS but it looks like SSRS has no control over rendering the looks and data in Excel (it keeps hiding columns and rows which is not acceptable). I have created a SQL connection on the Excel to get the stored procedure data into Excel.
Now I have to make sure the data goes into the template into appropriate fields. I think it needs groupings and page breaks also.
Please help..
You're on the right track with dumping SSRS as a way to export into the template. I've also found that the Excel rendering extension in SSRS does a lot of hiding and merging cells with certain report designs.
You will probably end up needing to write a script in your language of choice to load the data into appropriate cells on the template.
Here are some Powershell articles on Excel automation:
http://blogs.technet.com/b/heyscriptingguy/archive/2006/09/08/how-can-i-use-windows-powershell-to-automate-microsoft-excel.aspx
http://winpowershell.blogspot.com/2007/03/powershell-and-excel-com-object.html
Also take a look at Perl and the Win32::OLE module:
https://metacpan.org/pod/Win32::OLE
http://www.perlmonks.org/?node_id=153486
Related
we have a large number of existing reports (.rdl files), the business need is to enable business users to change the text on those report directly, they don't have report designer of any sort.
So requirement is to create a WPF app, that will allow user to browse to one of those reports, display them in readable format (not as xml but formatted similar to what the real report looks like, as if they are opened in the designer), and then allow user to update the text (essentially the contents inside those tags), and save the report. so when it's ran it'll reflect those title, heading, text etc. changes.
Did some research there are something like ReportViewer, Syncfusion reportviewer that can take care of displaying part in WPF, but none of them seems to allow user to edit and save.
Are there any suggestions on what are the options to achieve this? I am thinking creating some mapping/translating between those xml tags and html so the content can be displayed in a readable format, and put those user editable fields in array of values to keep track of changes and replace back to the original .rdl file. but that all seem too complicated and also performance can be a concern...there should be a better way!
your help is greatly appreciated!
Instead of having these values stored inside the report, I would store them in the database. Don't have any static values in the report. Everything shown in the report is loaded as paramters that can be configured.
This way you can create a UI that allows you to change the values of these configurations and a button to load the report viewer with a fresh version of the report using these values. This wouldn't be a full on report editor but if you created some base templates that meet the business needs, they'd be able to make some general modifications to the report such as Titles, alignment, logos, etc.
I'm currently working with BIRT and I am having problems trying to create a report with multiple data sources and data sets.
For example, let's say I have a wizard. This wizard allows the user to graphically select data sources in a list. After selecting a few data sources and finishing the wizard, I would like the report to be rendered with the selected data sources.
I have tried a few thing such as adding data sources/sets to an ElementFactory object, but that does not seem to work.
Does anyone know of where I can find documentation on this sort of thing? Possibly some pointers?
Thanks.
I have a project where we are creating a custom report generator for SSRS 2008R2. This project allows the user to select fields from a database and then create and store the RDL on the report server.
For some of the initial proof of concept attempts we have been using XMLText writer to generate the XML file. While this works this seems to be very cumbersome and I don't have a lot of confidence in how the schema is being generated as being 100% bulletproof. A second attempt is actually using the generated class from the RDL as my object model. Where I am stuck here is there is almost zero documentation on how to use this object. MSDN has a tutorial on updating the model but it very basic in concept.
I'm looking for some guidance on the preferred approach.
1) continue with the XML generation
2) use the RDL object to create the reports
3) I have also considered using the SSRS endpoint where a dummy report is created and stored on the server then using the RDL object model to update the report with the necessary fields, groups etc.
I haven't tested the third option but it seems as this would minimize the amount of coding for the creation of the document.
Thanks for any suggestions or ideas
I just built a program that creates an SSRS report from a report template and a stored procedure.
I am using the RDLObjectModel to create the report. And RDLSerializer to allow saving the report to a file or the report server. I first load a report template from our report server through the SSRS web service to deserialize the server report into and RDLObjectModel. I then derive parameters for the report fields, and derive fields from the stored procedure to make a report dataset.
The problem that I ran into is that I wasn't able to serialize the report object to be able to save it to the server or to a file because in RDL2008 RDLSerializer is private. Then I came across an article that saved me a lot of headaches. http://ucodia.fr/2011/10/advanced-reporting-services-part2-rdl-serializer/
This is a much better approach that using XMLTextWriter. This should provide you enough to get things rolling.
I ran into the same problem where I was using RdlObjectModel to create my report object but I was unable to serialize it. There is a way to overcome that issue where you can still get instance of the RdlSerializer and call serialize method using reflection
You can find the implementation at the following link
Is there anyway possible to have a SSRS Report that has excel like tab? Bascially a user has many data saved in Excel sheet with many tabs (close to 7-8) with little difference in those tabs. Hence he was looking for to built the report that when exported to excel can bring data in those tabs.
Second Question: When I export the report to excel, is it possible to have predefined filters in excel?
Let me know for any questions.
Thanks!
You can configure the report (2008R2 and up) to break the data up into named tabs when exporting to Excel...
Reporting Services export to Excel with Multiple Worksheets
I don't think you can have predefined filters in excel (I'm assuming you mean the Excel Auto-Filter stuff on the data ribbon tab) with the basic export to excel functionality in SSRS. If you go custom (via the ReportViewer control) then you could add logic to update the export file (after exporting) to programmatically add in the filtering options.
As far as i have worked on SSRS, i dont think so we can import parameters in excel same as in report.
However we can show data in separate sheets in excel
As you said data can be in 7-8 sheets, there are properties named 'PageName' and 'Pagebreak' of a tablix. Write the name of the page and add page break between those tablixes.
This will create sheets and also give names on those sheets.
I'm kind of new to Access. I've got some experience working with integrating MySQL and Oracle with PHP to create web-based database search engines, but I am having difficulty understanding certain concepts with Access.
I've got a small database with around 200 entries with 20 fields each. I've written a form to search it by using VBA to run an SQL query against the database and displays the results in datasheet mode to a different form (is this the standard way of doing this, or is there a better way?)
I want to be able to add a button to export those results to excel (or csv or tab or whatever, it doesn't really matter). However, I'm not sure how to do this with the form results. Its easy with an entire database, but I can't find documentation on how to do this. Is there a way to do this? Or am I doing this wrong?
If at all required, I can provide more details.
You said "I've written a form to search it by using VBA to run an SQL query against the database and displays the results in datasheet mode to a different form".
If you mean an actual form in datasheet view, you can export that form's data to Excel with the DoCmd.OutputTo method.
DoCmd.OutputTo acOutputForm, "frmResults", acFormatXLS, _
"C:\SomeFolder\ExportedResults.xls"
However, if you're opening a query in datasheet view, rather than an actual form, you can export the query's result set.
DoCmd.OutputTo acOutputQuery, "qryResults", acFormatXLS, _
"C:\SomeFolder\ExportedResults.xls"
You can choose a different OutputFormat instead of Excel if you wish. Look at Access' Help topic for the OutputTo method to see the available choices.