cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports NET - change culture

Former Member
0 Kudos

My application references Crystal Reports DLLs and uses them to generate reports (Using CrystalDecisions.CrystalReports.Engine.ReportDocument).

I need to customize the way Crystal outputs dates and numbers.

First I tried to set Culture on the thread that uses ReportDocument and calls its ExportToDisk method.

(Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture)

Then I tried setting the default culture for my application

(CultureInfo.DefaultThreadCurrentCulture and CultureInfo.DefaultThreadCurrentUICulture).

Neither of these helps.

Is there any way to change Culture under which Crystal generates report?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos
Former Member
0 Kudos

Thank you Don,

this really helped a lot. I managed to make it choose the right culture.

I have one more question. Is there a way to specify date or number format explicitly?

Say I want to use Czech date format but I want to keep numbers formatted like US (dot instead of comma as decimal).

Something like you can do with .NET CustureInfo.DateTimeFormat.ShortDatePattern.

Thank you very much!

0 Kudos

Hi Jiri,

You would need to use Formatting formula to handle each object format.

Post to CR Designer forum, search first though, I believe someone else wanted to do the same thing.

In the formula editor there is a formula function called - ContentLocale

You should be able to use it possibly, otherwise a formatting formula for each object.

Don

Former Member
0 Kudos

I was hoping I can get around that. Never mind, thank you very much, Don!

0 Kudos

If you set your formula and other objects to System then it may work if you change the culture without having to change each one. Otherwise I don't think there is any other way.

Don

Answers (0)