How do I display HTML content correctly in RC |
Post Reply |
Author | |
mstuart
Groupie Joined: 06 April 2010 Location: United States Status: Offline Points: 36 |
Post Options
Thanks(0)
Posted: 23 February 2011 at 4:32pm |
Hi all,
I need to display HTML content from an email HTMLBody (and RTFBody) in a cell in a Report Control. Currently it shows all the tags and content, which is not what I want. I would like to show in the cell the content as HTML format. I've played around with the ReportControl.EnableMarkup = true, but still doesn't work. Actually, here's my VB6 code to set the properties: With ReportControl .AllowEdit = False .BorderStyle = xtpBorderThemedFrame .EnableMarkup = True .SetCustomDraw xtpCustomBeforeDrawRow .PaintManager.ColumnStyle = xtpColumnOffice2003 .PaintManager.ForceDynamicMarkupForCell = True End With And here's the code to add the record item: Set Item = Record.AddItem(RDOMail.HTMLBody) Item.Caption = "<TextBlock>" & RDOMail.HTMLBody & "</TextBlock>" Nothing is working for me. Any advice is welcome. |
|
Regards,
Mark Stuart Product: Xtreme SuitePro (ActiveX) v13.2.1 Platform: WinXP (32bit)/Win7 (64bit) Language: VB6 (SP6), Magic eDeveloper v9.4, uniPaaS v1.9 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
EnableMarkup is for Codejock's subset of XAML, not HTML.
There is no easy way to display HTML in a report that I can think of. You could create an HTML to XAML parser, but this would be no small feat (depending on what HTML tags you need to convert). If you could render your HTML and RTF to a picture, you could store the pictures in the ReportControl icons collection and then show those pictures using the reportcontrol, but I'm not sure how efficient this would be (if you have a lot of records, it might not be feasible). |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
mstuart
Groupie Joined: 06 April 2010 Location: United States Status: Offline Points: 36 |
Post Options
Thanks(0)
|
Hi jpbro,
Thanx for your reply. I deferred to the email's Body property to show "only" plain text to the user in the RC. When the user dbl-clicks the row to view the details, that's when I can show them the HTML/RTF in an ActiveX object I have called rmpHTML. |
|
Regards,
Mark Stuart Product: Xtreme SuitePro (ActiveX) v13.2.1 Platform: WinXP (32bit)/Win7 (64bit) Language: VB6 (SP6), Magic eDeveloper v9.4, uniPaaS v1.9 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |