Binding/Auto-Updating charts in Word document with data from MS SQL Server - database

I've a task wherein I'm required to work with Microsoft Word document and database. Basically the word document has numerous charts that are created by users in two steps, first is to prepare charts in excel, then take screenshot and paste in Word document. It's tedious process as it requires re-doing charts anytime someone wants to do what-if simulations.
When I insert a chart in Word, the underlying data comes from Excel Sheet which I am able to fetch from database as 1 time operation, but it's not productive that much as users will have to open excel sheet, refresh data in sheet manually.
I tried to find different solutions but I'm blank as it's totally new work for me, there are elementary examples suggesting VSTO but I couldn't find more detailed examples specifically for charts like the scenario I've.
Has anyone tackled similar issue? If so please advise. I'm open to use either VSTO, OpenXML or even R packages that can help to auto-generate word document with updated charts.
Thank you.

I found solution by using R, it satisfies what I was looking for. A related task and steps are in my other question are here!

Related

PowerBI - Additional Files

I have created a PowerBI. The source of the data is a SQL database. The amount of data I am working with is over 4M rows but unfortunately, PowerBI is not able to load the data. When I look at the TaskManager (see image), I see multiple subprocesses that seem to be running in the background. The file does not give me an error, but it just runs the entire night and still does not load the 4-5M rows.
Is this something y'all have seen before? None of my colleagues have seen this. Would love any inputs.
Thank you,
Kruthika

Excel not pulling all records from view

One of my users is trying to pull all the data from one of my views in SQL Server... She's about 200 records short. What gives? I don't even know where to start troubleshooting this. She's not using any filtering on the data, she's trying to pull it all using Excel's 'External Data' features.
I don't want to be spoon-fed, but I don't even know where to start looking to troubleshoot this. If someone could point me in the right direction to begin my investigation, I'd greatly appreciate it.

How can I create a crosstab/pivot table in pentaho data integration?

I would like to turn the first picture into the 2nd picture (and I'm too tired to embed the pics, sry) https://imgur.com/a/SJtNo (output: Excel)
I also dont want to use a java script.
Thanks for your help.
I think you might want to use the Row Normaliser step, there are 2 different samples in the Samples directory of your PDI (\data-integration\samples\transformations).
There is also some examples on the Pentaho wiki, which you can access through the help button from within the step itself, in any case here is the link to it: http://wiki.pentaho.com/display/EAI/Row+Normaliser
There are also quite some examples of this step and other questions such as yours that have been answered here on stack and at other several PDI dev. blogs.

Need help stringing together database processes

I need some help from those with more knowledge than I posses. I am currently trying to figure out how to get real time data from a database.
I need to be able to find the company info from the most recent licensees. So the search parameter I'm using is 2016-05-10T00:00:00.000
The full string together from the API and the search parameter can be found directly at this link:
https://www.hurl.it/?method=GET&url=https%3A%2F%2Fdata.wa.gov%2Fresource%2Fv8vv-gqqs.json&headers=%7B%22X-App-Token%22%3A[%22bjp8KrRvAPtuf809u1UXnI0Z8%22]%7D&args=%7B%22licenseeffectivedate%22%3A[%222004-07-14T00%3A00%3A00.000%22]%7D
So I'm looking to retrieve the most recently added accounts in order to verify 1. the license is active 2. the license number the contractor gives matches what the website says. I would like to figure out how to automate this so that when the newest licenses are added I'll know, and they will be extracted/downloaded into excel.
If anyone can help with this I would appreciate it very much. I also have more questions about using databases if any of you are experts in the field.
Once again, thank you!
Clay
Since your goal is to get this data into Excell, have you considered using something like our OData support instead? You could structure your query in Excel PowerBI and it'd automatically refresh the data.
Another option would be to use our CSV output type with an Excel web query. I use the IMPORTDATA(...) function in Google Sheets, which is very similar.

Generate a series of documents based on SQL table

I am trying to formulate a proposal for an application that allows a user to print a batch of documents based on data stored in a SQL table. The SQL table indicates which documents are due and also contains all demographic information. This is outside of what I normally do and am trying to see if these is a platform/application that already exists to do such a task
For example
List of all documents: Document #1 - Document #10
Person 1 is due for document #: 1,5,7,8
Person 2 is due for document #: 2.6
Person 3 is due for document #: 7,8,10
etc
Ideally, what I would like is for the user to be able to push a button and get a printed stack of documents that have been customized for each user including basic demographic info like name, DOB, etc
Like i said at the top, I already have all of the needed information in a database, I am just trying to figure out the best approach to move that information onto a document
I have done some research and found some people have used mail merge in Word or using Access as a front end but I don't know if this is the best way. I've also found this document. Any advice would be greatly appreciated
If I understand your problem correctly, your problem is two-fold: Firstly, you need to find a way to generated documents based on data (mail-merge) and secondly, you might need to print them two.
For document generation you have two basic approaches: template-based and programmatically from scratch. I suppose that you will opt for a template based approach which basically means that you design (in MS Word) a template document (Word, RTF, ...) that acts as a template and contains placeholders and other tags that designate »dynamic« parts of the document. Then, at document generation time, you need a .NET library/processor that you will pass this template document and the data, where the processor will populate the template with the data and return the resulting document.
One way to achieve this functionality would be employing MS Words' native mail-merge, but you should know that this would involve using Office COM and Word Application Automation which should be avoided almost always.
Another option is to build such a system on top of Open XML SDK. This is velid option, but it will be a pretty demanding task and will most probably cost you much more than buying a commercial .NET library that does mail-merge out-of-the-box – been there, done that. But of course, the good side here is that you will be able to tailer the solution to your needs. If you go down this road I recoment that you use Content Controls for tagging documents/templates. The solution with CCs will be much easier to implement than the solution with bookmarks.
I'm not very familliar with the open source solutions and I'm not sury how many there are that can do mail-merge. One I know is FlexDoc (on CodePlex) but its problem is that uses a construct (XmlControl) for tagging that is depricated in Word 2010+.
Then there are commercial solutions. Again I don't know them in detail but I know that the majority of them are a general purpose document processing libraries. Our company has been using this document generation toolkit for some time now and I can say it covers all our »template-based document generation« needs. It doesn't require MS Word at doc generation time, and has really helpful add-in for MS word and you only need several lines of code to integrate it in your project. Templating is very powerful and you can set-up a template in a very short time. While templates are Word documents, you can generate PDF or XPS docs as well. XPS is useful because you can use .NET/WPF prining framework that works with XPS docs to print documents. This is a very high-end solution, but of course, the downside here is that it is not a free solution.

Resources