Print when submitting, but not if form is not complete. - InfoPath Dev
in

InfoPath Dev

Print when submitting, but not if form is not complete.

Last post 01-13-2011 11:04 AM by mcminmark. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-04-2010 12:03 PM

    Print when submitting, but not if form is not complete.

    I have created a form using 2007 that does not allow submittal unless the form is filled out.  What I'd like to do is prevent printing unless the form is filled out. I know I can turn off the print capability (icon in the ribbon), but how do I provide a print button so I can design it not to be available until conditions are met?  I'd like to do this without custom coding, but if I need to I will.

    Thanks... my first post.

    Mark   

  • 01-09-2011 04:54 PM In reply to

    Re: Print when submitting, but not if form is not complete.

    You can only print in InfoPath using the Print Preview button in the toolbar, but nothing in the toolbar can be affected at run-time, so it's either always there or never there.  If you need it to sometimes NOT be there, then it has to ALWAYS not be there.  Then, you no longer have the built-in print capability and would have to add Full Trust custom code to print on demand with a button.  Are you sure this is what you want to do?  Why are people printing an electronic form to paper?

  • 01-09-2011 05:26 PM In reply to

    Re: Print when submitting, but not if form is not complete.

    Thanks for the reply.  The form is a for international shipment requests.  They print off a copy to put with the product to ship, as the form is submitted to our licensing department for approval (if it meets a certain criteria).  People cheat by printing it before the form is completed.  They can't submit it but they can print it (they take the path of least resistance). So, I would like to add a Full Trust custom code print/submit button.  What is my best avenue to learn how to do this?  I'm already past what my IT staff can support, InfoPath wise.

    Thanks,

    Mark  

  • 01-09-2011 05:31 PM In reply to

    Re: Print when submitting, but not if form is not complete.

    The code is on this forum and all over the Internet.  I don't ever use code in my forms, but I've seen it enough times to know it works.  I'm certain it works for client forms but not certain what to do for browser forms.  Which type are you using: client or browser?  The problem is that it requires Full Trust, which requires admin-deployment.  That's poor in that it's dangerous from a security standpoint and introduces much more overhead to your development, maintenance, and deployment.  It causes an IISRESET, must be handled by farm admins, causes a feature to be created, and makes it into a content type that must be added to a form library for future use (separate from your existing stuff).

  • 01-09-2011 05:49 PM In reply to

    Re: Print when submitting, but not if form is not complete.

    I am using client.  Our security is high visibility lately, unfriendlies trying hard to get in.  It's sometimes hard for me to wrap my arms around all the security issues, I only understand a low level of what is going on and IT is reluctant to discuss it (or the guys I talk to don't understand either). I'm self taught in InfoPath, SharePoint and workflows (which I abandoned).

  • 01-09-2011 07:25 PM In reply to

    Re: Print when submitting, but not if form is not complete.

    We can write the code for you if you want. We have done this before. Another option would be to have a batch print process running on your SharePoint server that prints the form out. Anytime you allow the person filling out the form to print, you're opening yourself up to tampering. The simplest and lowest cost solution would be to have a trusted person in a separate "buy desk" role get an email when the form is submitted (with a link to it), open the form and sign it. Digitally signing the form generates a print of the view that cannot be tampered with. This requires digital certificates for the signer. You could just have them print it as a PDF (CutePDF is a free tool) and attach the PDF to the form (that wouldn't require digisigs and would still give you an avenue to audit and compare down the road). I like low cost simple solutions and having a buy desk person do the printing is the way to go since you can never totally trust the submitters to attach the correct image.

     Best,

    Patrick Halstead
    Project Manager at Qdabra
  • 01-13-2011 11:04 AM In reply to

    Re: Print when submitting, but not if form is not complete.

    Thanks for the reply.  I got a change to sit with our IT and found code that worked!  Well, it worked in a simple test document.  I still need to try it in the real documents.  I'll repost when I get to that (may be a few weeks).

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