on 04-25-2017 8:25 AM
Hi there,
In our C#.Net application we use Crystal Reports for Visual Studio 13.0.19 and we use the "Enter Parameter Values"-Dialog (ParameterPromptControl).
Our problem is that on some client-PCs this parameter-prompt-dialog displays english texts such as:
- dialog-title: "Enter Parameter Values"
- buttons "OK" and "Cancel"
- month-names in a date-chooser (e.g. February, March...)
...and on some client-PCs this parameter-prompt-dialog displays german texts such as
- dialog-title: "Werte eingeben"
- buttons "OK" and "Abbrechen"
- month-names in a date-chooser (e.g. Februar, März)
probably there are other texts as well.
We only want to show all of these texts in German no matter on which client-PC the application runs. Is it possible to define the language for this parameter-prompt-dialog fixedly so that the texts will be displayed always in German?
I'm looking forward to your response.
Andy
Hi Andreas,
A couple of things to do. And must be set before opening the report each time.
Here's code to get the list of support languages into a drop down list box:
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);
}
}
Then to set the Viewer to use the same you need 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);
}
Note: this only affects static text, values must be in German or depending on data source it can be converted by the client.
Formula text is English only.
I have not tested it using the ParameterPromptControl but if I get time I will.... It should though because there are language dll's for each also.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.