Hi,
I use the export to Excel function of radgrid, my users have been reporting that when they press "save" from the export dialog there is an extra folder created on their desktop with the same name as the XL file. Opening the XL file everything looks normal but when they email the XL file to anyone else it seems that ll the data is actully in the extra folder and the emailed file will not open correctly. Is this something that you are aware of?
We're using IE8 and Q3 2009.
Cheers
Jonathan
I use the export to Excel function of radgrid, my users have been reporting that when they press "save" from the export dialog there is an extra folder created on their desktop with the same name as the XL file. Opening the XL file everything looks normal but when they email the XL file to anyone else it seems that ll the data is actully in the extra folder and the emailed file will not open correctly. Is this something that you are aware of?
We're using IE8 and Q3 2009.
Cheers
Jonathan
| protected void btnExport_Click(object sender, EventArgs e) |
| { |
| LoadResults(); |
| radGridResults.ExportSettings.FileName = "FaCTS_" + Request.QueryString["ReportType"] + "_" + DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString(); |
| radGridResults.ExportSettings.ExportOnlyData = true; |
| radGridResults.ExportSettings.IgnorePaging = true; |
| radGridResults.ExportSettings.OpenInNewWindow = true; |
| radGridResults.MasterTableView.ExportToExcel(); |
| } |
| protected void LoadResults() |
| { |
| //Type reportType = Type.GetType("FaCTSServer." + Request.QueryString["ReportType"].ToString() + ", FaCTSServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); |
| //IList _results = (IList)Activator.CreateInstance((typeof(List<>).MakeGenericType(reportType ))); |
| Type serviceType = Type.GetType("FaCTSServer." + Request.QueryString["ReportType"].ToString() + "Service" + ", FaCTSServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); |
| object[] parameters = new object[] { txtSqlWhere.Text }; |
| try |
| { |
| //Invoking a static method (How to invoke a static method??) |
| IList _results = (IList)serviceType.InvokeMember("GetSearchResults", BindingFlags.Default | BindingFlags.InvokeMethod, null, null, parameters); |
| //load the clients |
| //_results = PersonService.GetSearchResults(txtSqlWhere.Text); |
| ReportColumn _col; |
| GridBoundColumn boundColumn; |
| radGridResults.MasterTableView.Columns.Clear(); |
| foreach (ListItem item in chkLstColumns.Items) |
| { |
| if (item.Selected == true) |
| { |
| //add a column to the report grid |
| _col = ReportColumnService.GetByID(Int32.Parse(item.Value)); |
| boundColumn = new GridBoundColumn(); |
| radGridResults.MasterTableView.Columns.Add(boundColumn); |
| boundColumn.DataField = _col.DisplayName; |
| boundColumn.HeaderText = _col.Heading; |
| boundColumn.SortExpression = _col.SearchName; |
| } |
| } |
| radGridResults.DataSource = _results; |
| } |
| catch |
| { |
| throw new ArgumentException("The SQL Where clause was incorrect, please contact your sysadmin"); |
| } |
| } |