Hello.
I have a report which we are rendering as a PDF. This report has one HTMLTextBox, which we wish to use to display the contents of an HTML email. (I am using 2010 Q3).
I'm finding that I can successfully set HTML into the HTMLTextbox in the designer, and have the HTML display in the report. However, if I try to set the HTML into the textbox in my databinding function, the report still shows the data entered in the designer, it has not been overriden with the data from the databinding function. Having no data in the HTMLTextbox in the designer does not change the behavior; in that case in the report the textbox will be empty
So, referencing the code below, the generated report is displaying 'hard coded paragraph", rather than "my paragraph". I have verified that the textBoxContents_ItemDataBound function is being called, that the bodytextbox variable is NOT null, and that when the function exits the bodytextbox.Value is still equal to the HTML set in the method.
Here are some bits of code that I think might be relevant. Thanks for your help!
I have a report which we are rendering as a PDF. This report has one HTMLTextBox, which we wish to use to display the contents of an HTML email. (I am using 2010 Q3).
I'm finding that I can successfully set HTML into the HTMLTextbox in the designer, and have the HTML display in the report. However, if I try to set the HTML into the textbox in my databinding function, the report still shows the data entered in the designer, it has not been overriden with the data from the databinding function. Having no data in the HTMLTextbox in the designer does not change the behavior; in that case in the report the textbox will be empty
So, referencing the code below, the generated report is displaying 'hard coded paragraph", rather than "my paragraph". I have verified that the textBoxContents_ItemDataBound function is being called, that the bodytextbox variable is NOT null, and that when the function exits the bodytextbox.Value is still equal to the HTML set in the method.
Here are some bits of code that I think might be relevant. Thanks for your help!
private void InitializeComponent() {
this.textBoxContents.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.700118362903595D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.2142907381057739D, Telerik.Reporting.Drawing.UnitType.Inch)); this.textBoxContents.Name = "textBoxContents"; this.textBoxContents.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(5.7998027801513672D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.28570938110351562D, Telerik.Reporting.Drawing.UnitType.Inch)); this.textBoxContents.Value = "<html><p>hard coded paragraph.</p></html>"; this.textBoxContents.ItemDataBound += new System.EventHandler(this.textBoxContents_ItemDataBound);
}
private
Telerik.Reporting.HtmlTextBox textBoxContents;
private void textBoxContents_ItemDataBound(object sender, EventArgs e)
{
Telerik.Reporting.Processing.HtmlTextBox bodytextbox = sender as
Telerik.Reporting.Processing.HtmlTextBox;
if (bodytextbox != null)
bodytextbox.Value = "<html><p>My paragraph.</p></html>";
}