How to remove blanks from an InfoPath 2010 data connection

Posted on 2012-08-13
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
    LVL 50

    Expert Comment


    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

    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.
    LVL 1

    Author Comment

    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?
    LVL 28

    Accepted Solution

    Yes, put your hide on the repeating section not on the text box.
    Select the repeating section and the n put the rule there.
    LVL 1

    Author Comment

    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.
    LVL 1

    Author Closing Comment

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
    Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now