Gd morning, Andre (or anyone with class ReportGenerator experience)… if you’re out there I have a ?
Thanks so much for creating this class, I think it will be very useful. I just have one problem I can’t seem to wrap my head around…
I’d like to mail the document (well ultimately several document). What is the syntax exactly?
Using your sample table report agent, this is what I worked out so far:
Sub Initialize
Dim rows%
Dim s As New NotesSession
Dim db As notesdatabase
Set db=s.CurrentDatabase
Dim view As notesview
Dim entry As notesviewentry
Dim vc As notesviewentrycollection
Dim cols As Variant
Dim viewname As String
viewname="MailTableData"
Set view=db.getview(viewname)
Set vc = view.AllEntries ' gets a handle on all the documents
cols = view.Columns
rows=vc.Count
Dim cp As Integer
Dim x As Integer
’ rows = 300
Dim rgen As New ReportGenerator(DISPLAYTYPE_TAB, "", "", Nothing)
rgen.AutoDisplay = True
rgen.AddReportTitle "Table Test Report", rows & " rows"
rgen.AddTableFromPage rows+1, "Table ViewReport", "Table ViewReport2"
’ rgen.AdvanceCell 3 ’ skip header row
Stop
rgen.AdvanceCell (Ubound(cols)+2) ' skip header row
Dim i%
For x = 1 To vc.Count
Print "Processing Row: " & x & "/" & vc.Count & " (" & Round(x/vc.count*100,0) & "%)"
cp=0 ' reset the column position
Set entry = vc.GetNthEntry(x)
Forall columns In entry.ColumnValues
rgen.AddText columns
rgen.NextCell
cp= cp + 1
End Forall
Next
’ get document???
rgen.Display
End Sub
Many thanks!!