Easiest approach to renaming datasource

danvonfeldt posted this 19 March 2018

I'm wondering what the easiest approach is to renaming the datasource. I.E. I have an xsd that already has a configured report with many fields, but I would like to change the name of the xsd schema and rebind without having to go into each field. Any ideas on doing this programatically or can I crack open the docx since it is just a zip and find something interesting in there?


24 Posts
24 Points
Order By: Standard | Newest | Votes
jles posted this 20 March 2018


Docentric Toolkit also has a so called "Template Management" APIs that allow you to create and update template documents. But the problem is that the current version only allows you to programmatically change a data source schema or preview data and there is no way to modify tagging elements (e.g. data bindings).

I think the easiest way to do it is, as you already pointed to, by opening these templates as OOXML packages and finding Docentric Toolkit "Template Metadata" (or Project Data). This is an XML document embedded in a template document as a custom XML part and you will find it inside folder "customXML". Normally the name of the file/part is "Item1.xml" but it can be anything else. Just open it and you will probably guess what to do if you need to do some basic find/replace operation.

I strongly suggest that you install Open XML Package Editor for Visual Studio. It will help you a lot with editing Open XML packages. Just note that it doesn't work with the latest VS2017.

I hope this helps,

Jure Leskovec

134 Posts
261 Points

Our 50242 members have posted 299 times in 88 discussions