Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - How do I display HTML content correctly in RC
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How do I display HTML content correctly in RC

 Post Reply Post Reply
Author
Message
mstuart View Drop Down
Groupie
Groupie


Joined: 06 April 2010
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote mstuart Quote  Post ReplyReply Direct Link To This Post Topic: How do I display HTML content correctly in RC
    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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2011 at 8:35pm
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

Back to Top
mstuart View Drop Down
Groupie
Groupie


Joined: 06 April 2010
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote mstuart Quote  Post ReplyReply Direct Link To This Post Posted: 24 February 2011 at 11:42am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.