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")
user$=session.CommonUsername
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
count%=1
Set docPrintPreview = New NotesDocument(db)
Set rtitem=New notesrichtextitem(docPrintPreview, "body")
docPrintPreview.Form="PrintPreview"
docPrintPreview.Subject="Subject "& titlu$ & " Date: " & d$
docPrintPreview.SubTitle=""
Call docPrintPreview.Save(True, True)
For j=1 To collection.count
Set doc=collection.GetNthDocument(j)
doc.c=count%
doc.Form="PrintItem"
Call doc.RenderToRTItem(rtitem)
count%=count%+1
Next
Call docPrintPreview.Save(True, True)
End If

End Sub

This was first published in March 2001
This Content Component encountered an error

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close