Grouping the controls in print view and setting values on submit - InfoPath Dev
in

InfoPath Dev

Grouping the controls in print view and setting values on submit

Last post 06-08-2009 01:42 AM by SandFish. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-04-2009 01:04 AM

    Grouping the controls in print view and setting values on submit

    Hello, There are two questions that keeps running me down.. 1) I have a form, that needs to be printed after filling it out. Basically, it is a report, that needs to be signed afterwards, so the the print view has a signature section at the very bottom of the form. The problem is, that the form contains a lot of repeating sections, therefore it can grow leghtwise almost absolutely. Accordingly, in certain cases, the page breaks of the form shapes in the way, that the signature section is moved to the next page, thereby forcing the participats to sign a blank page, which is not allowed in legislation. So the question goes - is there a way to group or unite the signature section which basically is a layout table, with the last section of the form, so that they always stick together and are moved to the next page together, if needed? 2) A question regarding the same form. After the form is filled out, the data is submitted to a Sharepoint library and the view is switched to a printer-friendly one. The issue I cannot figure out by myself is how to check all the text box controls upon submit, and for the text boxes that are left blank, set the default value - "n/a". Can this be accomplished just by using rules or should it be coded? Thanks in advance!
  • 06-05-2009 11:28 PM In reply to

    Re: Grouping the controls in print view and setting values on submit

    Hi -- I'm not sure of the answer to your page break question, but you have a few choices for your 'N/A' text boxes. The simplest would be to add two expression boxes for each field that might hold text or be blank. Set conditional formatting on one expression box to hide if the field is blank, and for the XPath, bind it to the field. For the second expression box, set conditional formatting to hide if the field is NOT blank, and set the text to 'N/A'.

    There is also a formula you can use that creates a type of an 'if' statement. Here is more information about that. I've attached a simple sample to this post. Right click the link in the header of this post and select 'Save as'. Then, when you have saved the form locally, right click the .xsn file and select 'Design' to open in design mode. Then preview the form, fill out a field and Print Preview to see the functionality.

    Hilary Stoupa

  • 06-08-2009 01:42 AM In reply to

    Re: Grouping the controls in print view and setting values on submit

    I've managed to solve the N/A text boxes the easiet but the most time consuming way - just by putting a rule on a button, that determines whether the field is blank, and sets its value to "N/a".

    Now, there is just the page break issue left. I've tried almost anything, but with no success. Looks like the default printing functionality of Infopath even page breaks the texbox control, if there's more than one row in it. Arrgh.. :(

    I've also tried to use image as a background for table, to group the signature section (Expression box) with a repeating section of text box controls. Nonetheless IP moves the image to a new page, and breaks the controls in section apart, leaving one box on the one page, and all the rest - on the other.

    Is there a solution or workaround for this, or this cannot be done?

    Any help or ideas regarding this page break issue would be very appreciated..

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