How do i populate a print report with selected form fields - InfoPath Dev
in

InfoPath Dev

How do i populate a print report with selected form fields

Last post 01-17-2009 09:32 PM by Ian Dawson. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-04-2009 05:30 AM

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    How do i populate a print report with selected form fields

    I am a newbie to Infopath. And I am not confident at all with VB, or C++ (pointers threw me).

    How do I populate a print report with selected form fields and the rest of the text in the field sentence.

    I am trying to write a report which shows only lines (sentences) which are checkbox selected.
    I don't want blank lines for the unselected lines.

    Can you help please?

  • 01-04-2009 11:47 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How do i populate a print report with selected form fields

    Hello,

    Check out this link,

    http://www.infopathdev.com/forums/p/3507/13974.aspx#13974

  • 01-04-2009 05:15 PM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How do i populate a print report with selected form fields

    Thanks for the response Shiva. Following is Matt Faus's response, I think that is what you are referring to:-

    "Anyways, I'm kind of thinking about this as a "Rolodex" kind of situation where you have a repeating section with several fields and a button in each one.
     What you could do is have a hidden field in the repeating section that would act as a "sentinel" and
     put code behind the button that would change the sentinel value to enable printing of the specific section (contact in the rolodex example).
     Say you have fields Name, Address, Phone, and Email, you would add one more - PrintEnable.
     Now the code in the button would put a true in the PrintEnable field (you could also do this with rules),
     switch views, print, and finally set PrintEnable back to false
     (you might even want to switch back to your original view). 
     The other view that you would make would be a repeating section bound to the same nodes in the data source
     as the one on the main page where you have all of them,
     except you would filter the ones that it selects to display only the ones where PrintEnable == true.
     Since the only way PrintEnable will become true is when you press the button you know that this section will only have one contact in it.'
    **************************************************
    Does Matt mean a button against each field!!!

    Going over his response I read the suggestion as,
             each line on the main form has a hidden control field "PrintEnable(1 to 180)"
             A corrsponding field on the second form is set to match the field on the first (via the Database)

    What I have is a large repeating section, a customer screen.
    But what text and code on the form screen is largish, over 93 customer fields plus comment lines, on 123 lines.
    I want to produce a report that shows only the fields selected and not show any blank lines.
    And this report page will be for the one customer. 

    I have experimented with the button calls, and can call another form. So I understand what to do there.
    But I fail to see how the second form would not be populated in much the same format lines as the current.
    Except unchecked lines will show a blank line.  Maybe I am wrong.

    The 2nd form is in a memo (report) format. I fail to see how I could join up the lines to make a paragraph.

    Thanks again,

     Ian

  • 01-17-2009 09:32 PM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How do i populate a print report with selected form fields

    Hi Shiva,

    Hilary finally provided the clues that I needed. 

    1. I was not aware, originally, that a print view was a screen that was modifiable.
        It makes sense in the infopath structure..

    2. A thought I had to add a control to an Expression box. 
        It wasn't until I tested one out that I realised that what you add was optional.
        You could add a control, hard coded text,
         or both, with the control first, I think, haven't tested that one yet!

    I consider problem solved

    thank you

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