HELP how do I Printout of a couple of selected lines from a large IP form - InfoPath Dev
in

InfoPath Dev

HELP how do I Printout of a couple of selected lines from a large IP form

Last post 01-15-2009 02:37 PM by Ian Dawson. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 01-06-2009 08:31 PM

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

    HELP how do I Printout of a couple of selected lines from a large IP form

     

    How do I print select lines from a FORM, lines can be randomly scattered anywhere around the FORM. 
    Many of the lines have drop down box entries,
    generally, If a line has an entry other than "Select" then it should be a line to go to the printer.
    Lines which have no choices will have a checkbox at the start of the line, so if the checkbox is selected then line should be printed.

    I looked at that link suggested by Matt Faus.  I haven't tried to experiment yet with it.  But I don't think it could do the task. 

    I think that to copy only the selected lines,
    I would have to add a checkbox at the start of each line.
    Then, I would have to duplicate the form in another form (or can we take a copy of the form) in a text file, call the text file back into the infopath, and ignoring the unchecked lines.  Is that possible?? 

    Then print out the new form??

    Is that at all possible????

    Ian

     

  • 01-09-2009 08:17 AM In reply to

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hi:

    I would create a Print View. Add all of the items on the regular view of the form in sections that are conditionally hidden if the checkbox is not selected. Does that make sense?

    Hilary Stoupa

  • 01-09-2009 07:33 PM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    No iit does not make it any clearer.

    But, I was thinking of using 'choice sections' somehow. I am not clear on their use.

    Or

    But If I move the lines off the form (many of which have drop down boxes in them) into a choice section or something.
    Would that work?

    Your response, the way I see it implies that the end user would have to perform a print view of the form,

     copy the form view onto a word document then edit out the lines of code. 

    That seems  very unuseable, especially for a large file.

    Can that be a solution?

  • 01-11-2009 03:21 AM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hilary

    I was thinking of also, perhaps somehow I could "save as" the form to a  text file, and execute  a C++ program function, or something in Visual Basic. This program would be used to analyze the lines end ignore lines unselected in its output to another text file.

    Also the output could be massaged as well to look like a letter.
    The massage would help make the letter appear with the appropriate headers and signoff at the bottom.

    What are your thoughts?

    Ian

  • 01-11-2009 12:37 PM In reply to

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    A form view's print view is the way the form data will look when the form is printed. I wasn't implying any user activities, except, perhaps, that the user print the form, which I had thought was your desired behavior.

    If you have your form open in design view, and the task pane showing design tasks, select 'Views'. The bottom of the task pane has a link "Create Print Version for this view". When you click that, a new view that is the print version of your current view is created. I'll include a simple sample with this to show what I mean. Save the form locally (right click the link in the header and select 'Save Target as') and open the form in design mode. Preview the form. Select a check box or two in the three sections available and from the file menu, select Print Preview. You'll see only the lines you selected.

    Hilary Stoupa

  • 01-11-2009 03:30 PM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hi Hilary,
    I am continuing to test your example, and adding various controls myself.

    I switch to the print view from the design screen. You can edit the format. 
    You cannot change the print view when being run by the user.

    As I have over 100 lines of text on the form, the user may only want few lines printed out.
    Today, say one from line 50 and the other from line 105.
    Tomorrow lines 21 22 and 67.
    I see that what the user would have to do, is to go into design mode and edit the print view.
    And hopefully they remember that they are looking at the print view and not the Form.

    It does not look good.

    I have been testing to concatenate the fields, Any unchecked fields should not affect the layout then.
    Maybe I could condense the 100 plus line down to about 30 or so.

    Or, somehow programmatically we do not show the unchecked lines, and not show a blank line.
    And as I said yesterday, may have to use VB or C++ to edit out the blank lines.

    Hilary, how didou set instructions (code) to the fields not to display on the print view if the check box is unchecked??

    How did you apply the hide on the print view, to the field, based on the checkbox being checked on the form?

    Is there hidden logic I have yet to apply?

    I am still testing.

    If you have any further clues, it would be most welcome.

    Thanks again Hilary

  • 01-12-2009 08:53 AM In reply to

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Really, except for controls that the user is intended to use to fill out the form, the whole point of a template is that the user *won't* be able to edit it. You want to design your template so that the user would never need to open it in design view.

    In my sample, I've use expression boxes in the print view that have conditional formatting on them. In IP2007, right click the expression box and select conditional formatting to see the formatting. In IP2003, I think it is on the display tab of the expression boxes properties.

    Here are some links that may help you:

    http://office.microsoft.com/en-us/infopath/HA101514381033.aspx
    http://office.microsoft.com/en-us/infopath/HA011227821033.aspx

    When you say edit out blank lines -- if you use expression boxes or a regular section for each item the user may wish to print and then conditionally format those to hide if the checkbox in the regular view is not selected, your form can be set up to autosize -- you won't have blank lines. If you are using a layout table, you can set the row height to be automatically determined, that way if there is nothing to print in the row, the row won't take up form space when you print.

    Hilary Stoupa

  • 01-12-2009 09:31 PM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hi again Hilary,

    I have tested the sample you gave with blank field and so on.
    And it works, lines of text will not be printed with height set to Auto. Woah Hoo.
    Yes I use conditional formatting a lot.
    I have been using the Print view extensively as from yesterday after you recommendation.

    Is there anyway I can hide a line of hard coded text plus a mixture of controls on the one line?
    The very first control is a checkbox. If the checkbox is unchecked, I would like the line hidden on theoutput print.
    Can you help here? If so hat should I do?

    All text that is to be displayed, or hidden, I believe, has to be in a field.
    And rules or conditions made on its value, or another fields value to display or hide the text.

    And that would mean adding a field to the database. Or, is there some other way?

    The form I have designd looks good. It has over a hundred lines of text  and 150 fields.
    I am working with an Access database which hasmany fields, many fields are numeric,
    and used to reference different phrases in specific Drop down boxes.

    On the form many lines of text contain drop down boxes amongst the hard coded text on the line..
    I am cannot see how to not display a line of text which has an unused drop down box,
    without moving all the hard code into a variable along with the drop down box value.

    Would I have to create a field and move all the line of text and code from the drop down box into that field. 
    And if the field is selected then display the line?

    Is there a better way?  I was thinking of expression boxes,
    but there appears to be no way to input text based on the checkbox being checked and produce output.

    There is a lot of hard coded text on the Form,  with each line containing a checkbox.
    As stated earlier, not all the lines of text or code will be printed.
    Is there a way to display text based on a checkbox value without loading up a database?
    Perhaps a resource file. Or, a seconday file.

    Any advice you can give on the above questions would be most helpful.

    And thank you again Hilary,
    Ian

  • 01-13-2009 05:07 PM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hi Hilary,

    I have been testing and developing with your advice, I think,
    however I have the following queries:-

    1. The system has an external database, and because of that
        I cannot add any field controls to a table row.
        I had planned to add Temporary controls to a Print View table row. 
        Move all the hard coded text and fields of that row into the temporary control.
        Apply all the appropriate display conditions.
        Do I need to create a secondary database to hold the additional fields, 
        I did not think it appropriate to put them into the primary (Access) database.
        
        After adding a secondary DB, I am faced with the same problems,
        cannot access the DB fields value in Design mode, to add print view values.

        I cannot add a list box, or a repeating table on the print view it seems.

        So where do I create Temporary fields, or program variables, what ever you want to call  them?
        With your example, I could create tables and add values when testing without an external DB.

    2.  In some cases I not want to show the row if the particular condition is false.
        So far it seems impossible to hide the rows of the table field. So many blank lines will appear.
        Is it to do with hard coded text on the table row?
        If  not what is causing the problem?

    Can you please advise on each of the above.

    Thanks
    Ian

  • 01-14-2009 07:53 AM In reply to

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hi, Ian:

    I am a little concerned that I may not be understanding your scenario correctly. Is your form based off a database? That is, when you created it, did you select 'Database' in the 'Based On' section in the Design a New Form window?

    Can you attach a copy of your form here, so I can better understand your challenges? Under the Options tab when you reply to this message, you'll be able attach a file.

    You cannot conditionally hide table rows, but you can set the row to automatically determine its height. If you put an expression box or a section with the information you wish to print in the table row, and conditionally hide the expression box or section, the table row height will be 0. That is why I keep saying you won't have blank lines. The other thing you can do is not use a layout table at all, just put your expression boxes directly on the form's print view, and again, if something conditionally hides, you won't have to worry about blank lines.

    When you say : "After adding a secondary DB, I am faced with the same problems, cannot access the DB fields value in Design mode, to add print view values." I don't really understand what you mean. You can, of course connect controls to a secondary data source and place those on the form's design canvas. You can't set default values, if that is what is you mean....

    Again, I'm kind of struggling to understand exactly what your form is like. If you can attach a sample, it would really help me.

    Hilary Stoupa

  • 01-14-2009 05:37 PM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Hi Hilary,
    Following are 3 lines from the form.
    ***************************************

    I was explained the nature of the procedure including the risks and benefits of this procedure and the plan required. 
          And was given the practice handout to read.
    I was explained the natural history of rotator cuff tears and the risk of tear progression with the poor prognosis.
    I was recommended to  Select...commencecontinue physiotherapy.
    **************************************************

    I initially designed the form WITHOUT a database connection.  I finally worked out, after 3 weeks, why I could not connect to an Access database,
    that occurred because I had the "enable browser-compatible features only" check box was checked.
    I then created an Access database using the fields created on the form  (copy / paste).
    After that, I crated a new form and was able to connect to the database.
    I had the Form-Template radio button selected.
     
    The form seemed okay. But on the output, I needed to hide some lines that were not checked, or had the drop down boxes selected.
     
    All the controls are in a database.
    And just recently I have been trying to work out how to create extra controls on the print view without loading up the DB.  Where can they be located?
    These controls will correspond to each line on the table. If, again a line is not to be used then the control will be hidden, and I am presuming the autosize will hide the blank line.
     
    Is my logic here going to work??

  • 01-15-2009 08:05 AM In reply to

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Database - based forms usually have an extensible schema, which means, over in the data source task pane, in the Main data source, you can add fields. Even though some of the form fields are then connected to the DB, you can have additional fields in the Main data source that are only in the form.

    I'm not sure *why* you would need extra fields though -- as you'll note in the sample I originally attached, you can use the expression box control. You don't have to bind that control to a field. The value doesn't have to come from a field. It can just be text, like "I was explained the nature of the procedure" or what have you. Then, put conditional formatting on the control. Set the expression box to hide if the field bound to the check box that is next to the text on the 'fill in' view for your form is selected. I'm not sure what the potential values for your check boxes are, I'd guess they are boolean (true/false) and when they are selected the value is true -- so your expression box with the text for your first line (for example) would be set to HIDE if the field bound to the checkbox next to that line was false.....

    Hilary Stoupa

  • 01-15-2009 02:37 PM In reply to

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

    Re: HELP how do I Printout of a couple of selected lines from a large IP form

    Yes, that was the key
           you create an expresion box, add the string only, close the box
           and apply the condition. I.e treat the expression box like a control.  I see the light!!!

    I presumed you could do it all in the one process.

    Thanks for that.

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