Merge Documents - InfoPath Dev
in

InfoPath Dev

Merge Documents

Last post 05-03-2006 09:05 AM by hawelek. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 04-20-2006 11:57 AM

    Merge Documents

    Hi,

    I was wondering if it's possible to create merge documents using InfoPath. I have a template word file with some data (FirstName, SecondName etc.) and additional content. A Windows application uses this file in order to generate a new word file within repeated content of the template file, additionaly replace FirstName and SecondName with database data from SQL Server. This solution works pretty well so far, however sometimes the new word file doesn't have correct format.

    That's why I'm thinking about InfoPath.

    best regards,
    Adam
  • 04-21-2006 08:53 AM In reply to

    Yes it is possible to merge forms together in InfoPath, see this training lab:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab11.asp

  • 04-21-2006 10:46 PM In reply to

    Hi Adam and welcome to our forum,
    This is one of the most underrated features of InfoPath. My team worked on it while I was at MS. It is very powerful.
    Patrick Halstead
    Project Manager at Qdabra
  • 04-24-2006 01:30 AM In reply to

    Thanks for your answers and link. I'm going to use this feature this week. So keep in touch.
    Best regards

    Adam
  • 04-27-2006 05:05 AM In reply to

    Hi Ted and Patrick,

    I had a look on the Merge Examples in the Tutorial as well as on the the examples in the SDK. They are very useful. So far I understood in order to create Merge Document from the SQL Server database I should:
    - transform data from DB into xml file
    - enable Merging and write OnMergeRequest event

    Is it correct?
    I have another newbie question:) How to insert page break between each section, as section I understand e.g. FirstName,SecondName... from each Customer. Although in the examples there was Page Break initially, it disappear after merging.

    Thanks again & best regards,
    Adam
  • 04-28-2006 02:26 AM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35
    Hi Adam,

    The answer which you mentioned about your first requirement is correct.
    But, As you think about the page break disappearance after merging the forms is not the correct assumption.
    Because, there is no relation between the merging functionality and the page break functionality. It is completely depends on inserting a page break by assuming the form preview length while designing it.
    And to insert a page break between the two sections, put the cursor after the first section ,and go to Insert tool bar and select page break menu item.
  • 04-28-2006 03:15 AM In reply to

    Hi Uma,
    Thanks for your answer. What I'm trying to do is basically to replace Word Documents with InfoPath. I have .NET Application which generates a Word document for each user from the database, so for example, if I have 5 users it'll generate 5 documents. I need to print those Word documents which is why I need a page break between each of them.

    So far the present word program has been working pretty well; however sometimes, depending on the Word Settings where the application is running, documents keep losing font settings, etc.

    That's why I was thinking about using InfoPath instead, but maybe I have misunderstood the objectives of InfoPath.

    Thanks & regards,
    Adam
  • 04-28-2006 06:34 AM In reply to

    Hello Adam,
    Yes you are correct you would have to get the data from the database into an XML file. InfoPath supports merging of multiple xml files. You do not have to write onMergeRequest for every merging. There is some default merging that happens on repeating sections. Lets say for instance if you have a Node A that is a repeating node which contains Node B and Node C. If you merge multiple documents with the same structure, then all of the repeating nodes will be by default merged. OnMergeRequest is needed when you want to do custom merging.

    About the page break issue - This is one way you could fix it. Lets say that you have a Customer Node with Information on that Customer in that Node. In your solution make Customer node a repeating node and have a view where you put the Customer information into the view as a repeating section with a page break. Now you will have a page break between the details of every customer.

    Hope this helps!
    Shanthi Reddy
  • 05-02-2006 03:04 AM In reply to

    Hi Shanti,
    Thanks for your answer.
    Probably I'm still not getting InfoPath.
    After default merging (without OnMergeRequest, using only File->Merge Forms) I have wrong result. I try to explain it. Let assume that there are two Customers A and B. I want to have one InfoPath document with structure:
    - Customer A data (FirstName,SecondName )
    - Some Additional content (text to sign etc.)
    - Page Break
    - Customer B data
    - Some Additional content (text to sign etc.)
    - Page Break

    Default Merging so far I've noticed do following:
    - Customer A.FirstName
    - Customer B.FirstName
    - Customer A.SecondName
    - Customer B.SecondName
    - Some Additional content (text to sign etc.)

    What I'm doing wrong?
    Thanks again and best regards
    Adam
  • 05-03-2006 12:09 AM In reply to

    • Mahitha
    • Top 200 Contributor
    • Joined on 05-24-2005
    • India
    • Posts 57
    For that you need to have a customer section which is repeating and which has nodes for first name, second name and additional content
    Now you will get Customer A data and then Customer B data
  • 05-03-2006 09:05 AM In reply to

    Hi Mahitha,
    Thanks to your answer it is finally working the way I wanted it to. Now I'm trying to connect the InfoPath with my winforms application.
    Therefore the next question is in:
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2307

    best regards & thanks
    Adam
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.