Printing Requirements


I have my standard form, this prints on 2 x pages, I have created a button so that the user can click on it and it will print the form, along with this I want it to print our standard terms and conditions, which is in a JPEG format - I don't want to include this anywhere on the form, the image name is STC.jpeg, how can I do this to print my normal form as well as this attachment if I could call it that way!

Here's the lotus script code for my button:
Sub Click(Source As Button)
      Dim workspace As New NotesUIWorkspace
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim uidoc As NotesUIDocument
      Dim note As NotesDocument
      Dim tmpDoc As NotesDocument
      Set uidoc = workspace.CurrentDocument
      Set note = uidoc.Document
      Set db = session.CurrentDatabase
      Set tmpDoc = New NotesDocument(db)
      Call note.CopyAllItems(tmpDoc)
      Call tmpDoc.RemoveItem("$KeepPrivate")
      tmpDoc.Form = "ABCD"
      Set uidoc = workspace.EditDocument(False, tmpDoc)
      Call uidoc.Print(1)
      Call uidoc.Close()
End Sub


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Why dont you have it as a subform and unhide the option only for printing ?

Well, I recall you saying you dont want to include this in the form.  But thats the only option I have for now for you.

You never know there could be a better solution too...

You can use an alternate form for printing. The @Command([FlePrint] has an option to automatically use the alternate form/
Barry TiceBusiness AnalystCommented:
Arunkumar --

There's an option to hide something when printed, but not one to show it when printed. Also, there's no @IsDocBeingPrinted option to key off of.

qwaletee --

That would work if the document were always printed using a button, but not for the people who use File -> Print, or <Ctrl-P>, and there are a lot of us out here.

collenr123 --

You could put in a section that has the terms and conditions in it. Make the label and the twistie for the section the same color as your background, and put it at the bottom somewhere where people aren't likely to tab across it and open it. Make it auto close when reading or editing, and auto open when printing. (Those are done on the second tab of the Section properties window.)

It's possible that someone would stumble across it and see it in on the screen, but for more than 99% of the time, it would be out of the way and go unnoticed.

Hope this helps.

-- b.r.t.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Actually, Barry's solution, with a little tweaking, is perfect.

Place the JPG in your database as a shared image resource.

Go to the bottom of your form

Choose Create -> Image resource

Select your resource

Click OK

Choose Create -> Section -> Standard section

Choose Section -> Section properties

On the second tab, set the following:
Previewed: Auto-collapse section
Opened for reading: Auto-collapse section
Opened for editing: Auto-collapse section
Printed: Auto-EXPAND section *********** "One of these things is not like the others, ..."

On the fourth tab, ENABLE the option HIDE FROM NOTES 5.6 OR LATER

That's it!  The section header never appears, becasue of teh hide-when.  When reading or editing, the JPG does not show, because the section is not just hidden, but it has also collapsed itself.  When printing, the section expands itself, revealing the JPG, even though the header is hidden.

That last part is a bit confusing, I'll explain. The section header has hide-when properties that are separate from the section's contents.  If the section header is hidden, the content can still be visible.  However, even if the content is "visible," the content can also be hidden by collpasing the section. So, when reading/editing/previewing, we have a visible disclaimer... but not really, becasue it is collpased.  But when printing, not only is the disclaimer visible from a hide--when standpoint, but the section is is also expanded, making the JPG really visible.  The fact that the header is invisible due to the hide when has no effect on the JPG inside the section.

This is essentially what Barry proposed, but without leaving the arrtifact of an expandable section that the user could click on when reading or editing the document, and thereby show the disclaimer.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Barry TiceBusiness AnalystCommented:
But you see, qwaletee, I'm on Notes 5.08, so I don't have that option. So I couldn't have suggested that one.

I didn't know the hide option hides the header without affecting the contents. That's a new one on me. Thanks!

Would it be just as effective to say "Hide paragraph if formula is true: @True"? If so, that would work for all releases, even the schmoes like me on 5.08 and many of my coworkers on 5.04a.

-- b.r.t.
@True is much less efficient, though proabbly not enough to make a difference.

But it was a typo... it should have said "From Notes 4.6 or later." Which would include schmoes like you :)
collenr123Author Commented:
Hi guys,

thanks all for the input, I am going to try each suggestion, just so you know, I am used Rel 5 or higher...

will revert shortly,

It was bailing wre and chewing gum, but a neat trick nevertheless, no?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.