Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to display chinese characters in report (rdl) in C#. I am getting the text from database and showing the same on report.
in database, I can see the chinese characters properly without any issue but they are not getting rendered on UI.

On UI, I can see garbage characters instead of chinese.

Appreciate help here !!

What I have tried:

I added below code in rdl where I want to see chinese text but it didn't help.


<FontFamily>SimSun</fontfamily>
<FontSize>9pt</fontsize>


Also, I set the the placeholder properties as "HTML - Interpret HTML tags as styles"
Posted
Comments
mtoha 17-May-23 17:27pm    
As far as I know, Your custom fonts should be installed on Operating System (eg : Windows),
Have you install SimSun font?
Member 9346617 18-May-23 1:02am    
Yes. In control panel, I can see that SimSun font was already installed.
Even I tried adding the chinese language in browser but still no luck.
Appreciate your thought on this.
mtoha 18-May-23 1:38am    
have you succeed to save chinese characters on database? Sometimes, if SQL Server and some databases failed to detect encoding, the characters saved it to unreaded characters. if you debug it, when characters loaded from SQL server, is it on correct chinese format?
Member 9346617 18-May-23 6:01am    
Thanks for your reply.
I have taken the datatype of column as "nvarchar" and I can save chinese characters properly in database. I can also retrieve them very well. But while showing it on rdl report, it's showing as "?????"
I tried setting the language of the designer under Localization as "zh-CN" and also set the same language for the text box but still it didn't help me.
mtoha 18-May-23 6:10am    
If you see the designer, try to check the Font. Like my picture at answer. The Font Type is SimSun. Previously, the default is Arial

1 solution

At my case, you should install chinese keyboard, to type chinese characters.

At textbox at RDLC, you can select SimSun font. Like this picture

https://live.staticflickr.com/65535/52906143304_e0f58c375e_b.jpg[^]


After I generate the report, the chinese characters is showing well.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900