Hi, I’m looking for suggestions as to the best way of doing things (and what’s possible).
I have an agent that runs overnight and creates a report as a table in a rich text field, created using DXL (as it gives more control over formatting than notesrichtexttable).
I created it with the Notes client in mind, therefore have a fair amount of font tags, background colour settings and the like.
Now I want it to be displayed over the web as well, but I can’t override font tags with css.
So, the question is this: Should I remove all the font tags and try to style the table in the notes client with css (not sure what would be possible)? Or, maybe create two different rich text fields, one with notes formatting and one without formatting for display on the web and use css for that one.
Any other suggestions welcome of course.
Thanks
Dan
Subject: DXL rich text table styles for client and web
Here is a technique I’ve used.
-
Create the table in notes client… set the table properties and insert the class names on the html tab of the properties box… just as if you were setting it up for notes client use.
-
Create a form in your database to hold this object. 3 fields: LookupName, Description, RichTextField
-
Create a hidden view with selection criteria which limits to only this new form’s name.
-
Create a document with your new form and populate the LookupName with an appropriate name… for example: MyTable
-
Copy/Paste into the RichTextField, the table you created in Step1
-
within your lotusscript get the new doc from your hidden view and paste it into your richtext field then populate the cells with the RichTextNavigator… here is a sample snippet:
Set view = db.GetView( “(HiddenView)” )
Set lookupdoc = view.GetDocumentByKey( “MyTable” )
Set rtitemA = lookupdoc.GetFirstItem( “RichTextField” )
Dim rtnav As NotesRichTextNavigator
Set rtnav = rtitem.CreateNavigator
Call rtitem.AppendRTItem(rtitemA) 'table is pasted here
rtnav.FindFirstElement RTELEM_TYPE_TABLECELL
For x = 0 To 9 'this is a 10 cell table (5 rows X 2 columns)
rtitem.BeginInsert(rtnav)
rtitem.AppendText( "TEXT# " & CStr(x) ) 'populating table
rtitem.EndInsert
rtnav.FindNextElement RTELEM_TYPE_TABLECELL
Next
Subject: RE: DXL rich text table styles for client and web
Thanks for your post Stan
I’m not quite sure what you’re saying about the styling of the table in both notes and web. You’re describing a method for creating a rich text table programatically, but I already have that.
You do talk about putting classes into the html properties of the table - is this usable in the notes client? If it is, I’ll have a go at creating a plain text table with html classes and using css in both client and web but just wanted some guidance on that.
Cheers
Dan
Subject: RE: DXL rich text table styles for client and web
This method I described, allows you to create a table, with all the attributes you need (including which class to use) via Notes Client - prior to when you’ll need it. As if your table is another database ‘resource’. Then when you need to create this table (for an email?) you can go get it from the document and paste it into your RTItem and then populate the cells.
Possibly (likely?) I misunderstand your needs. If your content is static and you want to present the table nicely to both user groups (web & client) - the best solution is two forms (or subforms) with same alias… hide from web/client checkboxes… use css for web and use table attribs for client version.
If I still have this wrong, reply and I’ll get right back to you.

Subject: RE: DXL rich text table styles for client and web
Yeah, my question was mainly about styling. I’ve got code that creates a table just fine. I do use DXL as opposed to the notesrichtexttable classes, but it’s an agent working overnight so that’s fine. DXL allows me to create hotspots on the fly pointing at documents within another database, which I don’t think I can do using the route you describe.
So, back to making it look nice/the same on the web and client - I’ve updated it so I add table cell classes, and this is working in general, I can now set the fonts using css on the web and client using the same table. I do have two forms, but I want to use the same table for both client and web as I just reckon duplicating the table is more effort than it should be.
So, I’m almost there and will continue to play with it. I think the only problems I have now are setting cell spacing or padding (which I don’t think are available in the notes client for css) and hotspot styles. The client won’t take a style like:
.link a {text-decoration: underline}
.link a:hover {text-decoration: none}
So I have to set the underline on a normal .link line, then the web ignores the no underline bit.
Dan
Subject: RE: DXL rich text table styles for client and web
I was right… I was wrong completely misunderstood your needs. Sorry, and now that I’ve answered… someone who really could help might not read further to find that some questions remain 
Please post your question again and I’ll keep quiet.

Subject: RE: DXL rich text table styles for client and web
No problem, Stan. Thanks for taking the time to think about it. I’d rather have an answer than complete silence - and everything you said was valid for some other post:)