Report fine; PDF export fine; Excel export crashes - ArgumentOutOfRangeException

I use the Report Viewer Redistributable 2005 Service Pack 1 (version 8.0.50727.1843). On my ASP.NET page the report displays fine, in a ReportViewer control, using an rdlc file. Export to PDF works fine. Export to Excel crashes. Stack does not tell me much because it’s all internal to the Report Viewer:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.ArrayList.get_Item(Int32 index) +7483656
   Microsoft.ReportingServices.Rendering.ExcelRenderer.DoubleList.get_Item(Int32 index) +5
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderImage(Image image, PageTableGrid pageTableGrid, PageReportItemInfo reportItemInfo, PageCell pageCell, Int32 row, Int32 col, Boolean addHeaderRows) +907
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderGridCell(PageLayout pageLayout, Int32 row, Int32 col, Hashtable& duplicateItemsTable, Boolean addHeaderRows, ReportItem parentItem, Hashtable riReferenceTable) +1317
   Microsoft.ReportingServices.Rendering.BIFFUtility.WorkSheet.WriteRowBlocksAndCells(ExcelRenderer excelRenderer, Stream stream, UInt32 indexBeginOffsetPosition, Int32 minCol, Int32 maxCol) +936
   Microsoft.ReportingServices.Rendering.BIFFUtility.BaseWorkSheet.WriteWorkSheet(ExcelRenderer excelRenderer, Stream stream, Int32 offset) +1730
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageLayout(PageLayout pageLayout, Int32& currentPageNumber, Stack& stack) +267
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageCollection(PageCollection pageCollection, Int32& currentPageNumber, Stack& stack, PageLayout& lastPageLayout) +718
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateWorkSheets() +128
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateMainSheet() +182
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderExcelWorkBook(CreateAndRegisterStream createAndRegisterStream) +159
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.ProcessReport(CreateAndRegisterStream createAndRegisterStream) +329
   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +243 
which does not tell me much.

 


Marc Schluper
0
marcschluper
4/30/2009 9:02:47 PM
asp.net.ssrs 4514 articles. 1 followers. Follow

1 Replies
1351 Views

Similar Articles

[PageSpeed] 3

By the way, I get exeactly the same stack dump if I (instead of using Export to Excel on the rendered page) do something like

     Warning[] warnings;      string[] streamids;

     string mimeType, encoding, extension;     

     byte[] buffer = report.Render("Excel", null, out mimeType, out encoding, out extension, out streamids, out warnings);

 in the code behind.

 

 


Marc Schluper
0
marcschluper
4/30/2009 9:39:27 PM
Reply:

Similar Artilces:

Exporting to Excel in Crystal Reports .NET
sir,   I want to export Crystal report to Excel and the following is the code i wrote in the button click.ReportDocument rptExcel = new ReportDocument() ;string strExportFile = "C:/Session_SessionID.xls" ;rptExcel = new RptJobOrderRecap();//report namerptExcel.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile ;rptExcel.ExportOptions.ExportFormatType = ExportFormatType.Excel;ExcelFormatOptions objExcelOptions = new ExcelFormatOptions();objExcelOptions.ExcelUseConstantColumnWidth = false ;rptExcel.ExportOptions.FormatOptions = objExcelOptions ;DiskFileDestinationOp...

How to show the report exporting date only in the exported PDF/Excel file (ReportViewer Control)?
Hello everyone, Our customer wants to display the exporting date only in the exported file when exports a report to PDF/Excel (we are using ReportViewer Control in ASP.NET). Can anybody tell me how to achieve this? Thanks a lot. I mean I have a textbox which will show date info, and you just want show this textbox for excel/pdf render in asp2.0. So you want it to hide when in the GUI but show up on export?  Yay for figuring things out.(@.@) Yes, you are right! Do you have any idea on this? And could I add the page navigation on the report footer? How?  Thanks ...

Report
Hi, I've build correctly my report using the most efficient tools. I've made the preview and it worked just fine!However, when I export to PDF, it splits the report heigth into two pages, having the columns of my table and other controls splitted. I'm already using the font size as 7 or 8 (depends), really small, I've tried hard to reduce their size, however the result remains the same...no resolution!!Is there anybody who may have or had this situation?Any guests or help?Thanks a lot!Best regards,David Ribeiro I have one this to say to you. Page Size. The number of issues with cont...

Exact datatype is missing in excel when export ssrs report to excel
  i have ssrs report with contains 3 fields like start date, end date, percentage value, for these fields i given date and percentage fromats in format tab of the textbox, i export this report into excel sheet, what is problem is , in the excel sheet i select the date or percentage column and select the format cells option and selected the number format,but here i did not seen any format like date or percenatge format what ever i given datatype in report and it shows general format only for all columns. here i need solution like when clicking the number format in format cells it shows ...

Exporting a report from VB.NET to Excel
Hi, I have one problem while exporting a report to excel. I need some columns will be formatted like 1,234,567.89. For doing this i have used the next line: Response.Write("<td align=right border=1>" & CStr(Format(rowItem.ItemArray(j), "#,##0.00")) + "</td>") The  problem i have is that this is working fine in my machine and in my test web server, but in the production server, when the value is 0, excel types "0" instead of "0.00".   I think this is a problem of web server configuration, i've tried to change the regional settings by selecting 2 decimals, but it...

To export or not to export?
Greetings! I wrote the following trivial module: package Trace; sub trace { my $message = shift; open (TRACE, ">>c:\\indigoperl\\htdocs\\data\\trace.log") or die "Could not open trace file: $!\n"; print TRACE $message; close TRACE; } my $motto = "Who invented this furshlugginer language anyway?"; I used it in the following even more trivial script: #!/usr/bin/perl use warnings; use strict; use Trace qw(trace); trace ("This is from the tracetest program.\n"); As you are no doubt aware, this didn't wo...

[ANN] Gnostice eDocEngine VCL v3.0 Released
Gnostice is pleased to release Version 3 of eDocEngine, our document-creation component suite for Delphi and C++Builder developers. A highlight of this version is Unicode support in the PDF engine. This means support for non-Latin text including right-to-left languages and mixed-language text, and all bidirectional text modes. There is a big increase in the speed with which the PDF engine processes non-Latin text. Output PDF files are also more compact, thanks to improved subset font embedding. The Excel and spreadsheet engines have been overhauled to export columns accurately a...

[ANN] Gnostice eDocEngine VCL v3.0 Released
Gnostice is pleased to release Version 3 of eDocEngine, our document-creation component suite for Delphi and C++Builder developers. A highlight of this version is Unicode support in the PDF engine. This means support for non-Latin text including right-to-left languages and mixed-language text, and all bidirectional text modes. There is a big increase in the speed with which the PDF engine processes non-Latin text. Output PDF files are also more compact, thanks to improved subset font embedding. The Excel and spreadsheet engines have been overhauled to export columns accurately a...

How to add barcode images in Reporting Services 2000 (SSRS 2000) with VS.NET Report Server Projects
Due to its flexible design, Neodynamic Barcode Professional for Reporting Services allows you to show barcode images in Microsoft SQL Server 2000 Reporting Services reports. You can use all Barcode Symbologies Linear & 2D built-in Barcode Professional.In this Step By Step Guide you'll learn how to create a Reporting Services report which shows barcode images into it using Barcode Professional and Visual Studio .NET 2003. In this sample we'll create a Reporting Services report to create fictitious access cards for Northwind's employees getting them from Microsoft's Northwind database samp...

exporting report to PDF crashed, need help.
The following code try to export a report to PDF but it crashed on the call of Export(). Any idea what I did wrong? Thanks. Here Simple1 is the name of the Crystal Report public Simple1 oRpt = new Simple1(); DataSet ds = new DataSet (); SqlDataAdapter da = new SqlDataAdapter("select * from Orders", SQLConnectionString ); da.Fill (ds, "Orders"); oRpt.SetDataSource (ds); string ExportFileName = "c:/temp/test.pdf" ; DiskFileDestinationOptions oDest = new DiskFileDestinationOptions(); ExportOptions expo...

How to Export data from crystal report to Excel or pdf
Dear All, I am using C# , asp.net(visual studio 2005) i have generated crystal report using Crystalreportviewer which also show pring and export option Now i want to export data from report to Excel or Pdf or word How i can i do it. please suggest me some link or example   Thanks I don't know if this will help much but I have done something similar. To create my crystal reports I would pull the data into a DataSet and then export that to an XML document. Then create the crystal report using the XML document as the datasource to get the fields. Once that was done I could delete...

[ANN] Gnostice eDocEngine VCL v3.0.1 Released
We are pleased to announce the release of eDocEngine Version 3.0.1. This version includes enhancements for the report export interface installer, several fixes related PDF creation, font handling and C++Builder compatibility issues. eDocEngine v3.0.1 supports Delphi 2010/2009/2007/2006/2005/7/6/5 and C++Builder 2010/2009/2007/2006/6. eDocEngine v3 is Delphi/C++Builder XE ready and the RAD Studio XE compatible version will be available as soon as RAD Studio XE is released. All XtremeDevSystem VCL and eDocEngine VCL 3.x customers with an active subscription get this upgrade and t...

[ANN] Gnostice eDocEngine VCL v3.0.1 Released
We are pleased to announce the release of eDocEngine Version 3.0.1. This version includes enhancements for the report export interface installer, several fixes related PDF creation, font handling and C++Builder compatibility issues. eDocEngine v3.0.1 supports Delphi 2010/2009/2007/2006/2005/7/6/5 and C++Builder 2010/2009/2007/2006/6. eDocEngine v3 is Delphi/C++Builder XE ready and the RAD Studio XE compatible version will be available as soon as RAD Studio XE is released. All XtremeDevSystem VCL and eDocEngine VCL 3.x customers with an active subscription get this upgrade and t...

Page Number issue when exporting ssrs report to excel
Hi I have created a ssrs report and I have exported it to an excel file. My report consists of 100 records and within the excel file I need to display as page 1 of 100 etc. It displays well within the report but inside an excel file it simply displays as page 1 of 1.Does any one have a concrete solution? thanks Hi, Based on my understandings, you mean that the records are divided into some pages when you see them via the browser. However, when you export them into the excel file, they are displayed in the same sheet, right? As far as I know, all of the records will be ex...

Crystal Report.NET: Error occurred when export to PDF
I encountered this error when attempting to export a report to PDF in a Window Form application: System.NotSupportedException: Error in File C:\DOCUME~1\tnguyen1\LOCALS~1\Temp\temp_a605641b-1f63-401d-b8e3-710c095306bd.rpt: Operation not yet implemented. at .A(Int16 , Int32 ) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() at WinFormReport.ReportManager.ExportToPdf(ReportDocume...

Web resources about - Report fine; PDF export fine; Excel export crashes - ArgumentOutOfRangeException - asp.net.ssrs

Plex Notify - Documentation
Plex Notify keeps you up to date on who&#39;s watching what on your Plex Media server, managing your server and gathering statistics.

Singularity RDK - Source Code
Experimental verified OS

Joy of Setup - Bob Arnson on setup and servicing with WiX and MSI
Joy of Setup Search Primary Menu Skip to content About me Copyright Search for: WiX WiX v3.8 released 28 November 2013 Bob Arnson 6 Comments ...

Names of Classes, Structs, and Interfaces
√ DO name classes and structs with nouns or noun phrases, using PascalCasing. This distinguishes type names from methods, which are named with ...

Species ALRE Forums • View topic - 0.6.1 Hotfix 3
I'm currently trying to debug this autodetect problem. Can you guys try something out for me? - Download and install this temporary patch (overwrite ...

Coded Smorgasbord: Sweet Mysteries of Life
... sender As Object, ByVal e As System.EventArgs) Handles ImageList.DataBound Try Catch ex As Exception If TypeOf ex Is ArgumentOutOfRangeException ...

Perishable Collections: The Benefits of Removal-by-Lifetime
As a lean co-operative team of seasoned developers, Twisted Oak is able to offer efficient, flexible remote and on-the-floor development and ...

Coded Smorgasbord: Classic WTF
... sender As Object, ByVal e As System.EventArgs) Handles ImageList.DataBound Try Catch ex As Exception If TypeOf ex Is ArgumentOutOfRangeException ...

Resources last updated: 12/7/2015 2:21:20 AM