Hi,
I have a report with some HtmlTextBox'es that I hide if they contain no data. This works fine in the ReportViewer and when exporting to Excel and RTF but when exporting to PDF I just get a blank page.
This is the code I use for hiding the textbox and the corresponding label:
If I use a normal TextBox instead it all works fine!
Another problem is that "bold" and "italic" text isn't shown as bold and italic in the pdf just as normal unformatted text?!
What's wrong and how do I solve this?
Thanks,
Brian
I have a report with some HtmlTextBox'es that I hide if they contain no data. This works fine in the ReportViewer and when exporting to Excel and RTF but when exporting to PDF I just get a blank page.
This is the code I use for hiding the textbox and the corresponding label:
internal static void HideEmptyHtmlTextBox(HtmlTextBox htmlTextBox, Telerik.Reporting.TextBox labelTextBox) |
{ |
if (htmlTextBox.Value == null || ((string)htmlTextBox.Value).Trim() == "") |
{ |
htmlTextBox.Visible = false; |
} |
if (!htmlTextBox.Visible && labelTextBox != null) |
{ |
Telerik.Reporting.Processing.ReportItemBase itemBase = ((Telerik.Reporting.Processing.ReportItemBase)htmlTextBox.Parent); |
Telerik.Reporting.Processing.TextBox label = (Telerik.Reporting.Processing.TextBox)itemBase.Items[labelTextBox.Name]; |
label.Visible = false; |
} |
} |
If I use a normal TextBox instead it all works fine!
Another problem is that "bold" and "italic" text isn't shown as bold and italic in the pdf just as normal unformatted text?!
What's wrong and how do I solve this?
Thanks,
Brian