Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2024-11-25 06:27:09

ttminh
Member
Registered: 2024-11-25

Problem when execute report with Vietnamese text

Team great work on this product. but I have problem when try to execute report with Vietnamese text, it like no font added when execute report. I use report from Jasper report
FluxBB bbcode test

Offline

#2 2024-11-25 10:48:12

ttminh
Member
Registered: 2024-11-25

Re: Problem when execute report with Vietnamese text

Edit: I found why this problem exist: In MS SqlServer database => table 'RS_JASPER_REPORT_JRXML' => column 'content' => this column save data of  Jasper report file content and datatype of this column is varchar(max), so I can not save Vietnamese character in Jasper report file. When I try modified datatype of column 'content' => error when start ReportServer with Tomcat, I check with PostgreSql and see datatype of column 'content' is text (can save Vietnamese character), so it fine with PostgreSql but anyone have idea to resolve problem with MS Sqlserver? FluxBB bbcode testScreenshot-2024-11-25-175551.png

Last edited by ttminh (2024-11-25 10:56:32)

Offline

#3 2024-11-25 11:08:22

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Problem when execute report with Vietnamese text

Hi ttminh,

In MS SQL Server, the varchar(max) data type is designed to store non-Unicode data. Since Vietnamese characters are Unicode, varchar(max) cannot correctly handle them. This is why the content of your Jasper report file, which contains Vietnamese characters, is not being shown properly. In contrast, PostgreSQL's text data type supports Unicode, which is why it works fine in your PostgreSQL environment.

To resolve this issue in MS SQL Server, you need to change the column data type to one that supports Unicode:

Modify the content Column to Use nvarchar(max)

nvarchar(max) is the Unicode equivalent of varchar(max) in MS SQL Server and can handle Vietnamese characters.

ALTER TABLE RS_JASPER_REPORT_JRXML
ALTER COLUMN content NVARCHAR(MAX);

This change will allow the column to store Unicode characters, including Vietnamese text.

Also, please ensure your JDBC Url of your datasource contains "characterEncoding=UTF-8", e.g.:

url="jdbc:sqlserver://localhost:1433;databaseName=ReportServer;encrypt=true;trustServerCertificate=true;characterEncoding=UTF-8"

Regards,
Eduardo

Offline

#4 2024-11-26 10:21:00

ttminh
Member
Registered: 2024-11-25

Re: Problem when execute report with Vietnamese text

As I mentioned above, changing the data type of a column will cause an error when starting ReportServer with Tomcat: Schema-validation: wrong column type encountered in column [content] in table [RS_JASPER_REPORT_JRXML]; found [nvarchar (Types#NVARCHAR)], but expecting [varchar(max) (Types#LONGVARCHAR)]

Screenshot-2024-11-26-171736.png

Last edited by ttminh (2024-11-26 10:26:32)

Offline

#5 2024-11-26 10:29:46

ttminh
Member
Registered: 2024-11-25

Re: Problem when execute report with Vietnamese text

Is there any reason why the columns in SQL Server are varchar(max) instead of nvarchar(max)? I noticed that other columns, like 'Name', are also varchar(max), which causes Vietnamese characters to not be usable.

Offline

Board footer

Powered by FluxBB