Skip to Content
0

Crystal Reports 2008 Print Issue

Feb 24, 2017 at 04:44 PM

88

avatar image
Former Member

Hi.

I'm posting it because I have an issue with Crystal Reports.

My company(from South Korea) is running a web service on Windows Server 2003, IIS 6, .Net Framework 1.1.4322 and Crystal Reports 10. Because of EOS of Windows Server 2003, we are trying to upgrade the server to Windows Server 2008, Crystal Reports 2008 SP7 and rest of the settings are same. A function we mostly use is Crystal Reports Viewer on the web service and everything works fine except printing Korean.

As I said, everything works fine. Crystal Reports Viewer can show Korean and can save to PDF well. However, when I print the report on the Crystal Reports Viewer, Korean changes to unrecognizable characters. Funny thing is that it only happens to parameter that I throw through URL and it works fine with data that I queried from DB. I have tried to find the reason why it happens and I have found that why this happens. This is because when I open the Crystal Reports Viewer with URL, the web service throws non-encoded URL. However, when I click the print button, Crystal Reports Viewer itself encodes URL automatically to UTF-8 or EUC-KOR I guess. Therefore, printings shows unrecognizable characters. Is there any way NOT to let Crystal Reports Viewer to encode URL?

Please, give me a solution or any tips for this issue. I will be so appreciated for your help.

BTW, Crystal Reports Viewer version is 12.0.1100.0

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Don Williams
Feb 24, 2017 at 05:04 PM
0

Try CR for VS version 13, requires VS 2010 to 2015 and then use the Locale Option to see if that resolves it.

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

CR does use UTF-8

See if changing this works for you:

CrystalDecisions.ReportAppServer.CommonControls.CeLocale myceLocale;

private void lstCeLocale_SelectedIndexChanged(object sender, EventArgs e)
{
//this is the routine to set the default language locale for the report. Must be done before the report is loaded.
CrystalDecisions.ReportAppServer.CommonControls.CeLocale myceLocale = (CrystalDecisions.ReportAppServer.CommonControls.CeLocale)lstCeLocale.SelectedItem;

try
{
rpt.ReportClientDocument.LocaleID = (CrystalDecisions.ReportAppServer.DataDefModel.CeLocale)myceLocale;
}
catch (Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
}
}

And when viewing use this:

// this gets the locale when set before the report was opened and sets the viewer to the same language
if (chkSameAsCELocale.Checked)
{
int x = (int)rpt.ReportClientDocument.LocaleID;
crystalReportViewer1.SetProductLocale(x);
}

Locale must be selected before you open the report

Don

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I am so appreciated for your help.

However, your solution did not work for me and unfortunately I am not in a situation to upgrade CR 13 or VS 2010.

I've found out that the Crystal Reports Viewer resend original url with rawurlencoded not UTF-8 when print button is clicked. Is there any way to prevent it with modifying existing JS files or modifying asp code?

I have tried to decode when sending parameters in the asp code as you can see below but it did not work for me.

original code : setParamValue(reportDocument1, "ParamPrj_Name", strPrj_Name);

modified code : setParamValue(reportDocument1, "ParamPrj_Name", HttpUtility.UrlDecode(strPrj_Name));

Would you please suggest me other solution?

0
Don Williams
Mar 02, 2017 at 04:23 PM
0

Ah, so you are using standalone "Crystal Reports Viewer". I don't have access to the developers for this product.

As far as I know it is what it is....

Don

Share
10 |10000 characters needed characters left characters exceeded