I have an Excel exporter and a document exporter. The excel exporter works fine, the document exporter gives me the error below using version:
Infragistics35.WebUI.UltraWebGrid.v9.2, Version=9.2.20092.2183Infragistics35.WebUI.UltraWebGrid.ExcelExport.v9.2, Version=9.2.20092.2183Infragistics35.WebUI.UltraWebGrid.DocumentExport.v9.2, Version=9.2.20092.2183
ASPX
<igtblexp:UltraWebGridExcelExporter ID="UltraWebGridExcelExporter1" runat="server" DownloadName="ReportExport.XLS"> </igtblexp:UltraWebGridExcelExporter> <igtbldocexp:UltraWebGridDocumentExporter ID="UltraWebGridDocumentExporter1" runat="server" DownloadName="ReportExport.PDF" TargetPaperOrientation="Landscape"> </igtbldocexp:UltraWebGridDocumentExporter>
Code Behind
protected void btnExportExcel_Click(object sender, ImageClickEventArgs e) { UltraWebGridExcelExporter1.Export(this.UltraWebGrid1); }
// first try with just one line. (This works fine in another project)
protected void btnExportPDF_Click(object sender, ImageClickEventArgs e) { UltraWebGridDocumentExporter1.Export(this.UltraWebGrid1); }
// what I have currently
protected void btnExportPDF_Click(object sender, ImageClickEventArgs e) { UltraWebGridDocumentExporter1.ExportMode = Infragistics.WebUI.UltraWebGrid.Exporter.ExportMode.InBrowser; UltraWebGridDocumentExporter1.DataExportMode = Infragistics.WebUI.UltraWebGrid.DocumentExport.DataExportMode.DataInGridOnly; UltraWebGridDocumentExporter1.Format = Infragistics.Documents.Report.FileFormat.PDF; UltraWebGridDocumentExporter1.Export(this.UltraWebGrid1); }
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index] System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64 System.ThrowHelper.ThrowArgumentOutOfRangeException() +15 System.Collections.Generic.List`1.RemoveAt(Int32 index) +7498328 Infragistics.Documents.Report.Text.Text.ComposeBody(TextComposition body, IGraphics graphics, UnitCollection units, FrameCollection frames, Indents indents, Tabs tabs, Single interval, Marker marker, Boolean flush) +4072 Infragistics.Documents.Report.Text.Text.Measure(Composition composition, IGraphics graphics, MeasureMode mode) +3741 Infragistics.Documents.Report.Table.TableCell.Measure(Composition composition, IGraphics graphics, MeasureMode mode) +1609 Infragistics.Documents.Report.Table.TableRow.Measure(Composition composition, IGraphics graphics, MeasureMode mode) +2711 Infragistics.Documents.Report.Table.Table.Measure(Composition composition, IGraphics graphics, MeasureMode mode) +8591 Infragistics.Documents.Report.Section.Section.Measure(Projection projection, IGraphics graphics) +2737 Infragistics.Documents.Report.Report.Measure() +956 Infragistics.Documents.Report.Report.Publish(Stream stream, FileFormat format) +2875 Infragistics.WebUI.UltraWebGrid.DocumentExport.UltraWebGridDocumentExporter.RenderDocumentToResponse(HtmlTextWriter writer, Control control) +437 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19 System.Web.UI.Page.Render(HtmlTextWriter writer) +29 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
I am also facing same problem with the latest version 2011.1 ultimate.
Please anyone from support answer the query.
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.ThrowHelper.ThrowArgumentOutOfRangeException() at System.Collections.Generic.List`1.RemoveAt(Int32 index) at Infragistics.Documents.Reports.Report.Text.Text.ComposeBody(TextComposition body, IGraphics graphics, UnitCollection units, FrameCollection frames, Indents indents, Tabs tabs, Single interval, Marker marker, Boolean flush) at Infragistics.Documents.Reports.Report.Text.Text.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Table.TableCell.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Table.TableRow.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Table.Table.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Table.TableCell.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Table.TableRow.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Table.Table.Measure(Composition composition, IGraphics graphics, MeasureMode mode) at Infragistics.Documents.Reports.Report.Section.Section.Measure(Projection projection, IGraphics graphics) at Infragistics.Documents.Reports.Report.Report.Measure() at Infragistics.Documents.Reports.Report.Report.Publish(Stream stream, FileFormat format) at Infragistics.Web.UI.GridControls.WebDocumentExporter.Export(WebHierarchicalDataGrid grid, Report report, ISection section) at Infragistics.Web.UI.GridControls.WebDocumentExporter.Export(WebHierarchicalDataGrid grid) at CS.CRA.Web.Dashboard.Scoreboard.ExportTo_Command(Object sender, CommandEventArgs e) in C:\Users\Pranav\Work\CRA\Code\CS.CRA.Solution\CS.CRA.Web\Dashboard\Scoreboard.aspx.cs:line 88 at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The problem "Index out of Range" still persists with Infragistics4.WebUI.Documents.Excel.v11.1 version. I get this error when i try to do use Infragistics.Document.Excel.Workbook. Save method. It will be great if Infragistics support team can respond regarding the same. Thanks.