Manage Learn to apply best practices and optimize your operations.

Generating Reports

1. Make a principal form ?- PrintPreview which show as the report and the headtable less the content of the table. It must contain a field Body ? rich text.

2. Make a secondary form -- PrintItem ?- which contains a table line (the upper) with the field from the documents that wil be show in the table

3. Make an reezi agent which will generate the document collection and after through changing of form with PrintItem and with the operation operatiunea RenderToRTItem in the Body field (rich text) from the form PrintPreview, it will generate the document with the desired report.

4. A view with form selection PrintPreview and a button for Generating reports with the Agent Report.

The Agent Report:
Sub Initialize

Dim session As New NotesSession
Dim db As NotesDatabase
Dim ws As New notesuiworkspace
Set db=session.CurrentDatabase
Dim collection As NotesDocumentCollection
Dim dateTime As New NotesDateTime( "12/01/94" )

d$=Inputbox("Introduceti data in format 22.09.2000")
sir$= user$

'main script
Dim docPrintPreview As notesdocument
Dim success As Variant
Dim rtitem As notesrichtextitem
Dim previewUiDoc As notesuidocument
Dim doc As notesdocument

Set collection = db.FTSearch( sir$ , 0 )

If collection.count>0 Then
Set docPrintPreview = New NotesDocument(db)
Set rtitem=New notesrichtextitem(docPrintPreview, "body")
docPrintPreview.Subject="Subject "& titlu$ & " Date: " & d$
Call docPrintPreview.Save(True, True)
For j=1 To collection.count
Set doc=collection.GetNthDocument(j)
Call doc.RenderToRTItem(rtitem)
Call docPrintPreview.Save(True, True)
End If

End Sub

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...