Hi.,
I want to display report rdlc columns in Arabic and English depending on the lang selection.
I have added the resx files for rdlc and the page in which rdlc is there .
I have initialized lang initialization method in the page where rdlc is present.. still Arabic columns are not reflecting..
Could you please check code once..
//report binding data = objBL.JobTitleReport(objEntity); rptvwr.LocalReport.ReportPath = Server.MapPath("JobTitleReport.rdlc"); rptvwr.LocalReport.DataSources.Clear(); Microsoft.Reporting.WebForms.ReportDataSource dataSource = new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", data); rptvwr.LocalReport.DataSources.Add(dataSource); rptvwr.LocalReport.Refresh(); var textData = objR.GetManagerDetails().Tables[0]; ReportParameter[] param = new ReportParameter[4]; param[0] = new ReportParameter("Name", "LoggedIn User : " + HttpContext.Current.User.Identity.Name); param[1] = new ReportParameter("date", "DateTime : " + DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss")); param[2] = new ReportParameter("text", Convert.ToString(textData.Rows[0]["TopText"])); param[3] = new ReportParameter("hospitalName", ddlHospital.SelectedIndex != 0 ? ddlHospital.SelectedItem.Text.ToString() : "All Hospitals"); rptvwr.LocalReport.SetParameters(param);
// page initialization protected override void InitializeCulture() { //string culture = Request.Form["ddSelLanguage"]; string culture = Session["Language"] != null ? Session["Language"].ToString() : null; // null;// "ar-SA"; // if (string.IsNullOrEmpty(culture)) culture = "Auto"; //Use this UICulture = culture; Culture = culture; //OR This if (culture != "Auto") { System.Globalization.CultureInfo MyCltr = new System.Globalization.CultureInfo(culture); MyCltr.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"; System.Threading.Thread.CurrentThread.CurrentCulture = MyCltr; System.Threading.Thread.CurrentThread.CurrentUICulture = MyCltr; //Page.UICulture = MyCltr; //Page.Culture = "ar-SA"; } base.InitializeCulture(); }