wait, then print then submit and then new record - InfoPath Dev
in

InfoPath Dev

wait, then print then submit and then new record

Last post 02-18-2007 01:11 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-16-2007 09:09 PM

    • jesse
    • Not Ranked
    • Joined on 02-17-2007
    • Posts 8

    wait, then print then submit and then new record

    I need to create a button that will switch to a different view, then print the view. Once it prints, the form is submitted and a new record is brought up clearing the previous record so new data can be entered. I have a button that will switch views, print the current view and then submit the form. However sometimes the procedure errors out because the system is still switching views when the system tries to print. I need to have it either pause for a few seconds after the switch command or wait but can't figure out the syntax for it to wait. After the form is submitted, I can't figure out how to get it to open a new record. The submit button has the option to bring new record but can't get the code to do it. The code I am using is

    XDocument.View.SwitchView("Edit and print service agreement");
    XDocument.PrintOut();
    XDocument.Submit();
    onAfterSubmit="OpenNew"

    Thanks for your help.

    Jesse
  • 02-18-2007 01:11 PM In reply to

    Re: wait, then print then submit and then new record

    Hi Jesse,
    Why not just define a Print view for the one you are on and have users print it manually and then click a button to submit? You can't print from a button without making your form Full Trust. That's because printing requires a greater level of security. I suppose you already know that since you are doing it in code already. :) For pausing, there should be some kind of sleep function in .NET you could use. After submit, just call query using another data connector (or the same one if you have a receive and submit DB connector). Sorry, I can't be more helpful!
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.