Print part of a form button

Posted on 2007-07-25
Last Modified: 2013-12-18

I have a button that currently prints part of a form.
Basically, half of the form is set to hidden when printed.

My issue is that now users want to be able to actually print this part of the form.
Is there any way of printing part of the form based on a condition? i.e. if flag = 1 then print top part else bottom part?
Or any other alternative suggestions/workarounds?

Question by:shuboarder
    LVL 22

    Assisted Solution

    Well, you already know about hide formulas, so I won't describe that here and the solution would probably be complex and hard to maintain using a bunch of hide formulas.

    Since the number of ways that the users want to print is relatively small, I would create a separate form for each type of print job.  This will do several cool things for you:

    (1) Less hide-formulas means better form performance.
    (2) Using separate forms makes it easier to define exatcly what will print.
    (3) You can take advantage of the "Print using form" option when printing selected documents from a view.
    (4) To print using different forms while the form is open, just use FilePrint and specify the formName parameter.

    @Command( [FilePrint] ; numCopies; fromPage; toPage; ifDraft; ifView; formName; breakType; ifReset; startDate; endDate)
    LVL 31

    Expert Comment

    Another way tio handle this is to use subforms, and condirtionally include the subforms that you want to include in the pirnt.
    LVL 19

    Expert Comment

    If it is for Web the approach will be different.
    For that, make use of <span> and <div> tags to export to a new window and print.
    Let me know if you need any help on the above.
    LVL 21

    Author Comment

    Hi Bill-Hanson,

    excellent idea! Only problem is this....

    Text. Optional. The name of the form you want to use to print the document. Specify an empty string ("") if you want to print the document using its current form. This parameter is ignored if you're printing from an open document.

    I assume I will have to pass the variables to the second form then run the print command, then close the second form. My concern now is the user will be prompted to save the second form which I don't want!
    LVL 22

    Accepted Solution

    Opps, I forgot about that.  Maybe that's why I'm not using it on my forms   :)

    Instead, take a look at @Command( [SwitchForm] ; formName );

    SwitchForm will display the current document using any form that you specify.  If the form is in edit mode, the user will be prompted to save before the form is switched.  There is no transfer of fileds, so the user will not be prompted to save the printable form (unless the printable form is editable and the user makes a change).  You may also want to make your printable forms read-only (ie: no editable or computed fields).
    LVL 21

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
    Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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

    17 Experts available now in Live!

    Get 1:1 Help Now