cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime error when exporting...

Former Member
0 Kudos

I have report running in an ASP.Net page using the Crystal Report viewer.  This is set up in a web site which is accessible via internal network and externally via the internet.

When trying to export the report with 97,250 records, I keep getting a runtime error.  When trying to export the report with 48,000 records, it works fine.

I have a button on the ASP.Net page for the user to export the report.  It has the following statement:

            myReportDocument.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.Excel, Response, True, strExportFile)

I have even tried using the Export button in the Crystal Report viewer and still got the Runtime error.

Report was created using SAP Crystal Reports 2011.

Crystal Report extension version 13.0.2000.0 is being used.

Using Visual Studio 2013 for development of the web site.

Is there a limit to the number records that can exported?

How to resolve this error?

Sincerely,

Keith Jackson

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Keith

Are you able to export 65,530 rows / records of data ?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

No.  The error still occurs even when I try to export the report with 64,297 records.

The error did not occur when exporting the report with 54,000 records.

Sincerely,

Keith Jackson

former_member183750
Active Contributor
0 Kudos

And what happens if you try to export other formats?

Can you view to last page?

Can  you print last page?

- Ludek

Former Member
0 Kudos

I can export to a PDF file without any errors.

I can view the last page.

I can print the last page.

It is just exporting to Excel format that is causing the error when the record count is more than 54,000.

DellSC
Active Contributor
0 Kudos

How many columns are in each row?  I may be wrong, but in addition to the row limitation in pre-Office 2010 versions of Excel, I also believe there is a limitation on the total number of cells that contain data.  If you have many columns, that may be what you're running into.

-Dell

Former Member
0 Kudos

It only has 12 columns.

Sincerely,

Keith Jackson

DellSC
Active Contributor
0 Kudos

The total number of cells probably won't be the issue, then.

-Dell

former_member183750
Active Contributor
0 Kudos

Any chance of you being able to attach the report - with saved data here?

- Ludek

Former Member
0 Kudos

I have created a version of the report with 64,297 records saved in it.  But it is a .rpt file and it is 1.643 Mb size.  I could reduce the number of records so it is 1.0 Mb but you may not see the error.

How do I attach the .rpt file to here?  Or where can I email you the file?

By the way, I tried exporting this version of the report to an Excel file through SAP Crystal Reports 2011 and worked successfully.  The error only occurs when accessing the report on our web site and trying to export to an excel file.

Attached is a printscreen of the Runtime error that occurs.

Sincerely,

Keith Jackson

former_member183750
Active Contributor
0 Kudos

Hi Keith

To attach you will have to use the "Use advanced editor" link (top right corner of your replies). Limit is 1 MG, so if the rpt zips down to 1MG do that, then rename the zip to txt. Otherwise, you'll have to upload it to some ftp server and let me know the link to that.

- Ludek

Former Member
0 Kudos

Attached is a .zip file containing the .rpt file for the report with 37,500 records.  As suggested, the .zip file has been renamed to .txt file.

Please let me know what you find out or if there is anything else I can try to resolve the issue.  Thanks!

Sincerely,

Keith Jackson

former_member183750
Active Contributor
0 Kudos

Hi Keith

I did an export of the report to XLS from the designer as well as a .MET app. Both exports gave me 45,576 records. I did not receive any errors.

I also did an export to PDF, the export was 1064 pages, matching the umber of pages I see in the CR viewer.

Now, in your post from Nov. 26 you say:


The error still occurs even when I try to export the report with 64,297 records.

The error did not occur when exporting the report with 54,000 records.

Which brings up the obvious question; why is the attache report with only 37,500 records? Size of the file did not zip to under 1MG when you had more records, so you could not attach it? There are 3rd party ftp uploaders that may let you ftp a file larger than 1MG(?).

- Ludek

Former Member
0 Kudos

I did not think you would get any errors when exporting since there is only 37500 records.  I can provide a file with a much larger amount of records but would not be able to attach it here since there is limit of 1 Mb.

What is a third party FTP uploader to use so I can provide you a file with a much larger amount of records?

Sincerely,

Keith Jackson

former_member183750
Active Contributor
0 Kudos

I can't recommend an uploader, but if you google 'ftp uploaders', you will get a number of hits.

- Ludek

Former Member
0 Kudos

I have created a version of the report with over 93000 records saved to it.

Here is the link to download the file:

Untitled Page

Please let me know what you find out.  Thanks

Sincerely,

Keith Jackson

Former Member
0 Kudos

Ludek,

       Have you had a chance to take a look at the file I have uploaded to the FTP shared site on 12/4/2014 that has over 93,000 records?

Sincerely,

Keith Jackson

Former Member
0 Kudos

I only have a 30 day trial with the ftp uploader.

Have you tried downloading the .RPT file with 93,000 records?

If so then have you tried duplicating the error I get with exporting the report to an Excel file from an ASP.Net page?

Sincerely,

Keith Jackson

former_member183750
Active Contributor
0 Kudos

Hi Keith

I managed to test the report and here are the results:

1) Export from the CR desinger viewer export button, takes 2 minutes and 15 seconds

2) Export from a .NET app viewer export button, takes about the same time

Both exported a file of 2986 pages and 65510 rows.

Unfortunately, I never asked for the actual error you are getting, however seeing the file size I wondered about httpresponse and googled a bit on limits of this. Large files using httpresponse may throw an HTTP 500 server error. From: Error message when a Web browser sends a request for an active server page to a Web server that is running IIS 6.0: &amp…

This issue occurs because of a change in behavior that was introduced in IIS 6.0 and added to IIS 5.0. These versions of IIS enforce a default ASP response buffer limit of 4 MB.

I realize the report is about 2.2 MB, but who knows what's happening to stuff it into the buffer, etc.

The following may also be worth having a peek at:

ASP Limits <limits> : The Official Microsoft IIS Site

E.g.; my take on this is that the file is simply too large to use with the ExportToHttpResponse method and you will have to either filter the report down, or export the report to a file, then use non CR APIs to display the xls.

- Ludek

Former Member
0 Kudos

Thanks for your help!

Now I am able to export a report with 87,275 records to an Excel file without any errors.  I only added executionTime="300" to httpruntime in the web.config.

But now I get a different error when trying to export the report with over 178,000 records to an Excel file.

I have been looking at the link you provided and made some changes in the IIS Manager regarding the buffer size but the error still occurred.

For now I have put a limit of 31 days of data on the report.  With that I am able to export to an Excel file and a PDF file.

former_member183750
Active Contributor
0 Kudos

OMG. Call me a dough boy LOL. Why did I not think of that. So obvious...

I really do thank you for posting the solution. Absolutely perfect.

Merry xmas and all the best in the new year,

- Ludek

Answers (1)

Answers (1)

Former Member
0 Kudos

I have faced this Run Time error number of times while exporting to excel format, and the reason was processing was taking more time (much higher than the response time set in my web.config).

Not sure, if this is the issue but, may be can give you some lead.

Former Member
0 Kudos

Thanks!

former_member183750
Active Contributor
0 Kudos

Hi Iti

Many thanks for the posting the idea

- Ludek

Former Member
0 Kudos

Thank you, well just started with the forums. Hope I can contribute some.