Table Data Wrong
Have been trying to populate a table but the last cell at the bottom right often end up with all the information in the array backwards. I’m not sure what is wrong here. Using 2 arrays to store the information and creating a table looked easy. Unfortunately, the information being populated looked awkward.
Code used:
Set rtFld = New NotesRichTextItem (nDoc, “sRptResults”)
tblRow = divCnt
tblCol = 3
Set rtNav = rtFld.CreateNavigator
Call rtFld.AppendTable(tblRow, tblCol)
Call rtNav.FindFirstElement(RTELEM_TYPE_TABLECELL)
For i = 1 To tblCol
For k = 1 To tblRow
Call rtFld.BeginInsert(rtNav)
Call rtFld.AppendText (k)
Call rtFld.EndInsert
Call rtNav.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rtFld.BeginInsert(rtNav)
Call rtFld.AppendText (divNameList(k))
Call rtFld.EndInsert
Call rtNav.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rtFld.BeginInsert(rtNav)
Call rtFld.AppendText (divCntList(k))
Call rtFld.EndInsert
Call rtNav.FindNextElement(RTELEM_TYPE_TABLECELL)
Next
Next
Call nDoc.Save (False, False)
Wonder what is wrong.
© WishBoNe for My Life With IT, 2007. |
Permalink |
No comment

This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 License.








