Print part of a form button

Posted on 2007-07-25
Medium Priority
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

Bill-Hanson earned 1000 total points
ID: 19567131
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

ID: 19568994
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

ID: 19572801
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.
Industry Leaders: 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 21

Author Comment

ID: 19572930
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

Bill-Hanson earned 1000 total points
ID: 19573525
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

ID: 19573748

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

850 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