cancel
Showing results for 
Search instead for 
Did you mean: 

Problem about Thai language in Crystal Report for web application.

Former Member
0 Kudos

I have same problem as lmck yo said in this thread.

But i doesn't use CrystalReportViewer because i use it in web application.

When user request a report, i send the report back with pdf file format.

The result of report have the problem like lmck yo described.

The code look like below.

rptExternalTransferReport rptH = new rptExternalTransferReport();
rptH.FileName = Server.MapPath("/Reports/rptExternalTransferReport.rpt");
rptH.Load();
rptH.SetDataSource([datatable]);
Stream stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
return File(stream, "application/pdf");

How to fixed this problem.

Help me please.

PS. Sorry for my english writing

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

To start, it would be nice to know what version of CR you are using, what CR Service packs have been applied and what version of .NET you are using. If the below does not help, let me know the above...

In a web app, you have the choice of using the CR viewer or as you are doing, streaming the report to PDF.

As a test, I'd like you to see how the localization works in a simple Win app 1st. This eliminates all kinds of permission issues, etc. All the app needs to have is the Win viewer on a form and one line of code;

CrystalReportViewer1.ReportSource = <path to your report>

Does the above work? Export to PDF - does that work?

Repeat above with a simple Win app. Again, does the report work in he CR web viewer? Does an export to PDF work?

If you need to see examples of apps, you can download these from here:

https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples

I also highly recommend you have a look at the following:

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm

then check out Crystal Reports .NET SDK > Tutorials and Sample Code > Other Tutorials > Configuring Multilingual Client Support.

If you are using CR 2008, then in the Crystal Reports 2008 .Net Developer Guide look for

Tutorial: Configuring Multilingual Client Support.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you VERY much Ludek Uher.

Using "Arial Unicode MS" have no problem.

But it only one font that i can use.

Thank you VERY VERY VERY much :).

PS. If you found other solution to fix this issue, please let me know.

former_member183750
Active Contributor
0 Kudos

I believe the issue is with the fonts - not CR. In order for a font to fully support certain languages (Chinese, Korean, Thai, etc.) the font must support Unicode or be Unicode enabled. Googling "Unicode font" should bring up resouorces applicable to your situation.

- Ludek

Former Member
0 Kudos

The test result is

Printing

Printing(and print preview) via CR Web Viewer have the problem. Both square symbol and Thai symbol doesn't show in paper.

Printing via CR app Viewer is perfect.

Exporting

Export to Word (.doc): Both web app and win app export perfectly.

Export to Crystal Report (.rpt): Both web app and win app have the problem (open with VS2010).

Note: In VS2010, when editing text the problem doesn't occur. But when when completed text, the problem occur.

former_member183750
Active Contributor
0 Kudos

What font are you using?

Using Arial Unicode I was not able to reproduce the issue(?).

- Ludek

Former Member
0 Kudos

I mean exporting to PDF.

I try CrystalReportViewer in both win app and web app.

In win app, i click export button and export to PDF file.

In web app, when click print button, it will ask me to export to PDF file instead of printing to printer.

Both of them have the problem.

Expected result look like this (CrystalReportViewer).

https://picasaweb.google.com/order2bellissimo/182011#5607913380174093890

Problem result look like this (PDF file).

https://picasaweb.google.com/order2bellissimo/182011#5607913378468079314

Thank you for your help

former_member183750
Active Contributor
0 Kudos

There is couple of us looking at the issue - for now two more tests;

1) You mention printing in web app you go to PDF 1st. This is because your CR Web Viewer is set to PDF print mode. See what happens if you try to print using ActiveX print mode (it's in the properties of the viewer). This will print to printer without going to PDF 1st. What does the print out look like?

2) Export to Word and Crystal Reports format from both the win and web app. What results do you get?

- Ludek

Former Member
0 Kudos

Thank you VERY much for your answer.

My Crystal Report version is CR for Visual Studio 2010 (CRVS2010) Service Pack 1.

I use vs2010 and use asp mvc for develop web application.

I just try use CrystalReportViewer in web application.

When use CrystalReportViewer(on web app) it have no problem.

But when click print button and export to PDF, the problem occurred.

So i think the problem may occur when export to pdf file, but not sure.

Edited by: Taevith on May 17, 2011 7:23 PM

former_member183750
Active Contributor
0 Kudos

Just a bit of an clarification please. When you say:

But when click print button and export to PDF, the problem occurred.

Do you mean you are printing to a printer (using the PDF print mode)?

Or actually exporting to PDF?

And just to be clear, the problem is that you are getting character substitution (squares, etc.)? Link to couple of screenshots will help; 1) Viewer screenshot, 2) PDF export screenshot

- Ludek

former_member183750
Active Contributor
0 Kudos

Oh. When you do '... click print button and export to PDF" in a win app, what happens?

- Ludek