How to programmatically populate form from a data source and save the form as an image. - InfoPath Dev
in

InfoPath Dev

How to programmatically populate form from a data source and save the form as an image.

Last post 11-23-2008 10:09 PM by Shiva. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-20-2008 08:16 AM

    How to programmatically populate form from a data source and save the form as an image.

    Hi All - I have been looking to programmatically populate form from a data source and save the form as an image, and InfoPath 2007 looked like it may be my best option for doing this.

    We would be periodically receiving data from an EDI transmission (although hopefully, we can convert this transmission to an XML file, text file or excel file, but that is another investigation).  The transmission would contain all of the fields / data for an individual document.  What we would like to do is import this data into an InfoPath form and save it as an image, so we can add the document to an image repository.  The InfoPath form would most likely need to be able to grow a detail line section of the form as the documents coming in are essentially Purchase Orders with lines of detail that could span several pages.

    Is this something that the InfoPath 2007 object model is capable of doing in a Visual Studio 2005 environment?  If so, could anyone point me in the right direction.  I see examples on importing data into forms, but none regarding saving the form as an image (all programmatically).

    I look forward to your responses!

  • 11-20-2008 10:30 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to programmatically populate form from a data source and save the form as an image.

    Hello Welcome to the Forums,

    We can you populate the form data from data source using the below code,

    IXMLDOMDocument2 secondaryDOM = thisXDocument.GetDOM("Secondary Data Source Name");

    secondaryDOM.setProperty("SelectionNamespaces", "<Namespace of your secondary dom>");

    //Get the node from secondary dom

    IXMLDOMNode secondaryDOMNode = secondaryDOM.selectSingleNode("XPath of your field");

    //Get the value from above node

    string secondaryDOMNodeValue = secondaryDOMNode.text;

    //To set the above value to main dom field

    thisXDocument.DOM.selectSingleNode("XPath of the field").text = secondaryDOMNodeValue;

    Here we can save the form. I am not getting save the image by programatically?

  • 11-21-2008 05:35 AM In reply to

    Re: How to programmatically populate form from a data source and save the form as an image.

    After I populate the form with the data, I want to programmatically save the populated form as a multipage image (tiff or pdf).  Is this possible?  Are you familiar with how to do something like this?

  • 11-23-2008 10:09 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to programmatically populate form from a data source and save the form as an image.

    Hello,

    I know about populating the field values but sorry to say I don't about how to save the form as image using programmatically. If you will get any update on this please post the solution here.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.