Last post Jan 01, 2011 02:56 PM by vijaypant
Dec 31, 2010 01:57 PM|aspman2009|LINK
I'm trying to create reports,i have their formats already in word formats,i know that there is a method where we tag the variables and we transform the word document to an xsd file (or xsl i think!) and we use stored procedures and/or function to extract
data from sql server.
but the question is how to do it.
Can you help me please
Thanks in Advance.
Jan 01, 2011 02:56 PM|vijaypant|LINK
Hi, first of all you download the "Content Control Toolkit" from codeplex website and "OpenXML SDK2" from microsoft website.
Then you create RichTextContentConrol or any other content control from the Developer tab in the word file to create the placeholders in the report template.
Next, use "Content Control Toolkit" to map the Custom Xml files nodes to the placeholders.
And finally, manipulate your template using OpenXML sdk and replace its CustomXMLPart with your own xml which you might be generating from your database or any other source.
Save the document and thats it.
I'm also using same thing in my current project. So, i had to do a little bit RnD on Bing & Google.