Hi all,
In my application (web) I need to generate large tables. I used to do that by writting HTML into text fields (computed for display). The tables became larger and this didn’t work anymore, so I switched to rich text fields. That was better. But the amount of data just kept growing and now I reached the limit of these fields.
I then tried to use the “official” tables for rich text fields (AppendTable and so on) but these tables can only have 255 rows and that’s not enough. Besides the fact that it takes several minutes to find that out (which ofcourse is not acceptable the code is below).
Does anyone has a suggestion on how to proceed?
Thanks in advance,
Joost
Sub Initialize
Dim view As NotesView
Dim doc As NotesDocument
Dim rti As NotesRichTextItem
Dim table As NotesRichTextTable
Dim rtnav As NotesRichTextNavigator
Dim count As Integer
Set session = New NotesSession
Set db = session.CurrentDatabase
Set context = session.DocumentContext
Set view = db.GetView("TheView")
count = 0
Set rti = context.GetFirstItem("TableField")
Call rti.AppendTable(1,5)
Set rtnav = rti.CreateNavigator
Call rtnav.FindFirstElement(RTELEM_TYPE_TABLE)
Set table = rtnav.GetElement
Call rtnav.FindFirstElement(RTELEM_TYPE_TABLECELL)
Set doc = view.GetFirstDocument
While Not doc Is Nothing
Call rti.BeginInsert(rtnav)
Call rti.AppendText(doc.ID(0))
Call rti.EndInsert
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rti.BeginInsert(rtnav)
Call rti.AppendText(doc.Name(0))
Call rti.EndInsert
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rti.BeginInsert(rtnav)
Call rti.AppendText("fill 1")
Call rti.EndInsert
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rti.BeginInsert(rtnav)
Call rti.AppendText("fill 2")
Call rti.EndInsert
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rti.BeginInsert(rtnav)
Call rti.AppendText("fill 3")
Call rti.EndInsert
Set doc = view.GetNextDocument(doc)
If Not doc Is Nothing Then
Call table.AddRow(1)
End If
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Wend
End Sub