No RESUME
Written by WishBoNe on April 18, 2007 – 10:23 pmStill on the dynamic view headache. I’ve tried to display the information extracted from the first document retrieved but when the loop ran into the final round because of no documents, it had an error of “No RESUME”. I spent hours trying to see which part of the code had problem and still couldn’t find anything wrong with it. Below is the code that I’m trying to use. Some how, there is something wrong and I’m so tired just looking at the code for 5 hours.
Set session = New NotesSession
Set db = session.CurrentDatabase
Set nDoc = New NotesDocument (db)
Call RemoveExistingDoc("vDocType", "frmResults")
nDoc.Form = "frmResults"
nDoc.searchRTitle = "This is tested on " & Cstr(Now())
Set rtitem = New NotesRichTextItem(nDoc, "searchResults")
REM Get all info
Set view = db.GetView("vSavedCat")
Set col = view.AllEntries
Set viewEntry = col.GetFirstEntry
rowCount% = col.Count
columnCount% = 2
Dim styles(1 To 3) As NotesRichTextParagraphStyle
For i% = 1 To 3 Step 1
Set styles(i%) = session.CreateRichTextParagraphStyle
styles(i%).LeftMargin = 0
styles(i%).FirstLineLeftMargin = 0
styles(i%).RightMargin = RULER_ONE_INCH * 1.5
Next
Call rtitem.AppendTable (rowCount%, columnCount%,, RULER_ONE_INCH * 1.5, styles)
cnt% = 0
While Not (col Is Nothing)
cnt% = cnt% + 1
Set vDoc = viewEntry.Document
mCat$ = vDoc.comboCat(0)
REM Populate table
Set rtnav = rtitem.CreateNavigator
Call rtnav.FindFirstElement(RTELEM_TYPE_TABLECELL)
For iRow% = cnt% To cnt%
For iColumn% = 1 To 2
Call rtitem.BeginInsert(rtnav)
Call rtitem.AppendText(mCat$ & " in Row " & iRow% & " Col " & iColumn% )
Call rtitem.EndInsert
Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
Next
Next
mCat$ = ""
Set viewEntry = col.GetNextEntry(viewEntry)
Wend
REM Save document and refresh view
Call nDoc.Save(True, False)
The while loop has been killing my brain cells. Anyone care to enlighten me?
Posted in Career, Design, Domino, IBM, Life, LotusScript, Programming, Software, Technology, Work |

















April 18th, 2007 at 11:53 pm
Line 23 should be:
While Not (viewEntry Is Nothing)
April 19th, 2007 at 11:03 pm
*slaps forehead*
Thanks Roman.