Thursday, March 19, 2009

How to print a computed footer on a Lotus Notes document

Recently I was asked to make a print form in Lotus Notes (R7), that required certain things you would normally rather do with a word processor (and yes, phase II includes exporting it to Symphony ;-)). One of these things was a variable, computed footer (a dblookup from a parameter).

Now Notes knows footers and Notes knows computed values, but it doesn't know computed values *in* a footer. Placing a computed value at the end of the form (there already, how would you define the end?) didn't help as the footer had to be on every page, well, just as expected from a real footer.

Trying to find a solution, I even went into the DXL code:

<item name='$Footer'>
  <rawitemdata type='1'>
    jv80AABEZWZhdWx0IFNhbnMgU2VyaWYAAAAAAAA
AAAAAAAAAAAEAAAkJADEyMzQ1Njc4OQ==
  </rawitemdata>
</item>
I found some interesting patterns changing the footer ;-), but nothing that would really help. Until, on one of these magic coffee breaks, I finally found a solution:

The footer on a Notes form knows the placeholder "&W", which stands for the window title of the document. The window title can be computed, so I placed my dblookup in the formula section of the window title, added "&W" to the footer of my Notes form, and had my variable, computed Notes footer.

One thing that does not work with this, is placing the formula in a computed field and adding the fieldname to the formula section of the window title. Notes computes the window title before the computed field, so the footer would be empty. In order to make it work, you would have to code the complete formula directly in the window title.

4 Comments:

Anonymous Anonymous said...

That's a neat trick. Is there anyway that could be used to include an image resource in the footer?

January 21, 2010 6:03 PM  
Blogger marcusfoerster said...

not that I would know of. If anyone has a solution for this one, I would be more than interested :-)

January 26, 2010 4:40 PM  
Blogger Julian Woodward said...

Good trick. Did you find a way to get this to work with multiple lines in the footer?

February 8, 2010 3:05 PM  
Blogger marcusfoerster said...

Unfortunatly not. That was a (tiny) problem we faced in the project. Now we are on Symphony, and everything is good :)

February 8, 2010 9:17 PM  

Post a Comment

Thank you for your comment. It will be published shortly. Keep having a great day!

<< Home