Greetings all
I have a simple winform app that loads a RadGridView and optionally exports it to Excel. The app works fine in the Development environment and as a standalone exe. However, when the code is moved to Citrix, the invocation of the RadGridViewExporter.Export method triggers an Excel error: "an error occured and this feature is no longer functioning properly". Once this error dialog is clicked, the export happens successfully.
I understand from various searches that this is likely a config issue with the server and not a Telerik internal problem. My hope is that someone has hit this before and might suggest a work-around from the application side.
We are using VS2010, .Net 4.0, and Q2/2011 Radcontrols for Winforms.
Relevant code follows. Many thanks for any advice.
private void Export(String filepath)
{
//this.radButtonExport.Enabled = false;
exporter =
new RadGridViewExcelExporter();
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork +=
new DoWorkEventHandler(DoWork);
worker.RunWorkerCompleted +=
new RunWorkerCompletedEventHandler(bg_RunWorkerCompleted);
worker.RunWorkerAsync(filepath);
exporter.Progress +=
new ProgressHandler(exportProgress);
radProgressBar1.Visible = true;
radProgressBar1.Text =
string.Format("Exporting to {0}", filepath);
radProgressBar1.Width = radGridView1.Width * 2/3;
}
private void DoWork(object sender, DoWorkEventArgs e)
{
exporter.Export(radGridView1, (
String)e.Argument, "script results");
}
GridViewDecimalColumn col =
new
GridViewDecimalColumn();
col.Name =
"Total"
;
col.HeaderText =
"Total"
;
col.FormatString =
"{0:c0}"
;
col.MaxWidth = 90;
col.MinWidth = 90;
col.Width = 90;
col.FieldName =
"Total"
;
col.FormatInfo = CultureInfo.CreateSpecificCulture(
"en-GB"
);
radGridView1.Columns.Add(col);
radGridView1.Columns[
"Total"
].Expression =
"IsNull(Ink, 0) + IsNull(PB_Products, 0) + IsNull(Office_Supplies, 0) + IsNull(Freight, 0)"
;
radGridView1.Columns.Move(11, 9);