This is a migrated thread and some comments may be shown as answers.

html encoding - prints encoded string

2 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David A.
Top achievements
Rank 1
David A. asked on 02 Sep 2011, 05:21 PM
Hi,

We are using HtmlTextBox in a mail merge type application.  When a field such as {ClientName} contains an '&' character, we are encoding it and in the ReportViewer this displays as "Robert & Janis".  When it prints it prints the encoded string such as "Robert & Janis". 

Any ideas on how to fix this?

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 07 Sep 2011, 07:49 AM
Hi David A.,

We are unable to reproduce any unexpected behavior with encoded strings used in HTMLTextBox and report viewers' printing functionality, thus we will appreciate if you elaborate further. Which report viewer have you used and can you send us a sample report that reproduces the issue?

Best wishes,
Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
David A.
Top achievements
Rank 1
answered on 13 Sep 2011, 06:48 AM
Hello,

I found the problem to be that I was doing the encoding in the databinding event of the detail.  When I changed the location in the constructor of the report (looping through all datarows) and encoding there, it worked fine.

Thank you for your assistance.
David
Tags
General Discussions
Asked by
David A.
Top achievements
Rank 1
Answers by
Peter
Telerik team
David A.
Top achievements
Rank 1
Share this question
or