I have a string with basic html markup which I want to put into a rich textbox
string ab = @"<b> a b </b>"
I want it to render as it would appear in a browser ie:
a b
how can I do this in active reports 7? According to http://www.datadynamics.com/forums/77664/ShowPost.aspx, a richtextbox supports these tags. Do I have to specify a property to allow it to render html? How should I approach this?
Thanks,
Sam
More information (Update 8/11):
I'm binding the data from a database field - an oracle nclob. The field repeats within the detail section (with different information each time).
If I bind the field directly to a textbox or label it renders the string, but doesnt encode the html
<b> a b </b>
but it encode the string.
Solution Summary
Solution (as suggested by @activescott)
- Bind rtx directly to the datafield
- 'Reformat' the text into html in
the script
public void detail_Format()
{
rtxBox.Html = rtxBox.Text;
}
result: renders the html field with some degree of html formatting
notes:
- binding directly in the script doesnt work,
ie. rtxBox.Html = pt.Fields["CONT_ID"].ToString(); yields some wierd meta data string
- the Datafield only binding approach doesn't work
(it will yield it as text)
- there are some extra spacing that occurs with p tags. It may be worth regexing them out or somehow providing some formatting control.