How to remove blanks from an InfoPath 2010 data connection

Posted on 2012-08-13
Medium Priority
Last Modified: 2012-08-14
I have a SharePoint 2010 list & need to display the information in an InfoPath 2010 form to create a report.

The form uses a data connection to the list & repeating sections to display the data. The data is filtered using rules to match against what ever is selected in a drop down box so the user only sees the data they need & the rest is hidden (If "value" is not equal to "value" Hide this Control).

All this works fine but when the data is displayed there is a gap at the top of the table. This gap gets bigger or smaller depenging on the data that is selected. It's sorted by age & if the newest data is shown then there is no gap, but as older data is displayed the gap gets larger & larger.

It looks like it adds a one pixel line for every record that is hidden. I've tried everything I can think of but nothing has worked. Does anyone know how to stop it doing this, as more & more data is added to the list the gap will get wider & render the form unusable.
Question by:trevor1940
  • 3
  • 2
LVL 50
ID: 38287326

does the repeating section have a border? Have you tried removing all borders and setting the margins and padding to 0 px?

cheers, teylyn
LVL 28

Expert Comment

ID: 38287376
Yah, this should not occur.

A couple tricks.  Grab the bottom edge of the controls involved, sections, etc and drag the edges up all the way to the top and release.  They will snap back to accommodate their contents but when hidden will not be fixed, this can happen sometimes.

Also make sure everything you are planning to hide is in a section, if not put it into a section.  You should only hide sections and not individual elements.

Are you using repeating sections or repeating tables?  When they hide records they completely disappear.

Author Comment

ID: 38287569
Thanks for your comments.

All the margins & padding etc are set to 0.

I just made a new form & left in the label for the text box in the repeating section.

When I filter the data the repeating section shows the label & adds a line to the list for each item that should have been filtered out (the text box remains hidden). Could this be because the rule with the filter in only applies to the text box and not to the repeating section & so the section will add a line in for every item even though the control it contains is hidden?

I can find another way to to filter the data, any ideas?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 28

Accepted Solution

clayfox earned 2000 total points
ID: 38287775
Yes, put your hide on the repeating section not on the text box.
Select the repeating section and the n put the rule there.

Author Comment

ID: 38291250
I tried that before but the option for rules was always greyed out. Tried again this morning & it's there! I must have been selecting inside the section rather then the section it's self. Thanks for the help.

Author Closing Comment

ID: 38291255
Thankyou. I've done this stuff so many times before & just couldnt figure out why it wasnt working. I must have been selecting the wrong area & just didnt see it. You saved me a lot of time.

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question