Control/Limit Printing of Repeating Table Rows - InfoPath Dev
in

InfoPath Dev

Control/Limit Printing of Repeating Table Rows

Last post 06-03-2013 03:38 PM by Nimius. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 05-30-2013 02:17 PM

    • Nimius
    • Not Ranked
    • Joined on 05-19-2013
    • Posts 9

    Control/Limit Printing of Repeating Table Rows

    Can I print the first 5 rows of a repeating table on a section of the first page of my form (print view) and then rows 6+ on the next page.

     For my situation, adding a page-break may not work because I need to print other fields on the first page - below the first 5 rows of the repeating set.

     Thanks!

     Brian

  • 05-31-2013 06:06 AM In reply to

    Re: Control/Limit Printing of Repeating Table Rows

    You could look into creating a section (or a view) that you can print. Printing the view that the users use to fill out the form is likely not going to give you the result you want.

    You can have two "modes" in your form: "fill out" and "print". While filling out hide the sections designed for printing, and viceversa.

    Your section would then have the repeating table and you could look into conditionally hiding rows 6+. Add any other fields you want to print there as well. That's your first "print section". After it, have a page break. Then have another place where you have the repeating table filtered to hide rows 1-5.

    Hope that makes sense! Creating a nice print view is definitely not easy and takes some trial and error to get every control to look right. Good luck.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 05-31-2013 08:03 AM In reply to

    • Nimius
    • Not Ranked
    • Joined on 05-19-2013
    • Posts 9

    Re: Control/Limit Printing of Repeating Table Rows

     Hey Ernesto thanks for the response,

     So, yes i already have a fairly elaborate print view where i need a section in the center to hold the first 5 rows.  I guess the question boils down to your reference to "conditionally" printing x-number of rows in a section of the form. 

     

    Should i be adding a table and binging it to the repeating data?  Is this where the conditional logic is applied?   This is the actual question I'm asking.  How do you apply the filter/condition.  Is it like building a query?  Obviously I'm not familiar with InfoPath binding

     

    Thanks!

  • 06-03-2013 05:33 AM In reply to

    Re: Control/Limit Printing of Repeating Table Rows

    If it's InfoPath 2010, select the repeating table and then click Manage Rules. Then click Add > Formatting. There's an option here to Hide the control and what that means is hide the row.

    Another option would be to right click on the repeating table control itself, in the view, and select Properties. Then go to Display > Filter data.

    Of course, in both scenarios you'll have to play around with the conditions in order to get your filter correct, but I imagine that using something like preceding-sibling should allow you to count the number of rows, and therefore hide the rows after row 5.

    As far as the binding question, you don't need to add a new table. You can have multiple controls bound to the same schema node. Since you already have a schema node for the repeating table you likely also have a repeating table already on the view somewhere. So you're basically displaying the same table twice (both bound to the same nodes). Does that make sense?

    Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-03-2013 09:53 AM In reply to

    • Nimius
    • Not Ranked
    • Joined on 05-19-2013
    • Posts 9

    Re: Control/Limit Printing of Repeating Table Rows

     Nice!  Have the row number calculating and the filter applied, all is well...but not home yet.

     

    Now my problem is to print 5 rows even if some of them are blank.  I have to use the middle section of the form even if the values are blank for some rows.

     I know I'm extending my request but really appreciate the help.   ...bet this is a common issue for forms that have to print in a fixed layout.

  • 06-03-2013 11:49 AM In reply to

    Re: Control/Limit Printing of Repeating Table Rows

    Sorry, I didn't understand this follow up question.

    If the repeating table has 5 rows, then 5 rows should display, unless there's a filter.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-03-2013 12:44 PM In reply to

    • Nimius
    • Not Ranked
    • Joined on 05-19-2013
    • Posts 9

    Re: Control/Limit Printing of Repeating Table Rows

    So sorry, I'll try again.

    Assume that there's a section of the form (print version) that has space for 5 rows of repeating data.

    Now, I have the filter working such that when there are more than 5 only 5 print (the filter works great)

    But what if I have only 2 rows of data.

    What I'm trying to support is an old "hand-filled" government form that has 5 rows of "fill in". 

    So, for example, if there are only 2 rows added by the user, then I need to print the remaining 3 rows of blank information - i.e. empty cells.

    I'm not sure how to "force" all 5 rows to print even if there's no data in some. 

    I hope that helps to clarify things.

     

     

     

  • 06-03-2013 03:38 PM In reply to

    • Nimius
    • Not Ranked
    • Joined on 05-19-2013
    • Posts 9

    Re: Control/Limit Printing of Repeating Table Rows

     Unless a more eloquent solution is proposed, I'll just let anyone interested to know, that I went ahead and created a field for every cell on my first page that will represent the first 5 rows of data.

     This is clunky but works.  This way the form section always has 5 rows of data in it

     I'm sure that there's a better way forcing a print line/row even if the repeating table has no more rows to print...but this works.

     

    thanks for your help!

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