I have a problem with Lotus Notes 5.0.8.
I have LotusScript code to generate reports in the Notes client. My template form has an average of 15 fields. From a document collection, I take values of each document and populate these template fields with it. I then render this template into my report documents' Rich Text field, so that I get a table-like format for the report. So after some 50-odd documents are rendered and I open the document, an error comes in. The error comes while opening the document, not while rendering. It takes lots of time trying to open the document and then the error pops up. It reads:
Document has too many paragraphs -- it must be split into several documents.How can I fix this problem? I very much appreciate your help on this.
I've seen this before, too. And, in fact, if you use the Design Synopsis feature on a large database design, such as your mail file, you'll see this is a problem with large Rich Text fields in general.
I would not have expected 50 repetitions of a smallish form to have this problem, however. I think your problem may involve more than just the total length of your Rich Text; it may also have to do with how many separate items are used to represent it. If you look at your report document's properties from a view, I think you'll see that the field name of your Rich Text field appears many times in there.
It probably would help to upgrade to Notes/Domino 6.
Otherwise, I believe you may get some relief if you batch up your report documents, say 20 at a time, into a separate Rich Text field, then use AppendRTItem to add them to the end of the main report Rich Text field. So you RenderToRTItem into field "TempRT," for instance, then every now and then you use AppendRTItem to add TempRT to the Body field, remove TempRT from the document and start again. This should give you a Body field consisting of fewer "items."
Another possibility: Generate your report using HTML instead of using a formatting form, write the HTML to a temporary file and either open the file in a Web browser or use the NotesUIDocument.Import method to bring it into a Notes document via the front end. Or you could use OLE automation to generate a report in a spreadsheet or word processing package.
Using the Notes C API or a third-party API such as Midas Rich Text LSX from GeniiSoft.com is another option.