Save your reports in a Notes document

Save your reports in a Notes document

Create your HTML report and save the result in a Notes document. This tip works both in Notes and Web. In Notes, use UIView event queryOpenDocument with an workspace.OpenUrl method.


In the Notes form, write the code to retrieve data, and write the html-code in a text variable, like this:

'Variable for save html
dim html as string     
   
html=html+"<table  width=100% border=0 cellspacing=1 cellpadding=3>"
'LOOP
do while not doc is nothing
html=html+"<tr style='font-  family:Verdana; font-size=10pt;color:midnightblue;background-color:whitesmoke'>"	
html=html+"<td>"+doc.myTitle(0)
html=html+"<td>"+doc.myValue(0)
...
html=html+"</tr>
html=html+"</table>"
loop

' at the end, save the text variable in
' a rich text item named HTML
' note that the field MUST be named HTML!)

Dim rtitem As NotesRichTextItem
Set rtitem = New NotesRichTextItem(doc, "HTML" )
Call rtitem.AppendText( html )
Call doc.save(True,False) 

Now, reopen the document and the report appears!

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This was first published in August 2001

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.