.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

PDF export generates out of memory exception

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :Sql Server
 

I've got a report I'm testing in SQL 2008 R2 Reporting Services (evaluation), and while it displays in the web browser fine when I go to export it I get some odd results. First of all, it exports to TIFF/MHTML formats perfectly fine. When I try PDF I get an out of memory error (with details below), and when I try to export to Word I get a skewed sliver of the report available on the right hand side of the page.

The interactive size and page size are 36" x 36", and margins of .25" are set for all sides. The body of the report is set to 35.5" x 35.5". Within the body there are 3 map components which take up the entire space, one on the left which is the full height and half the width of the body, and two on the right which are half the height and half the width of the body. The report displays fine in the designer, and when rendered in a web browser - so I'm pretty sure it's not a matter of too much detail.

While rendering the report for the browser the available physical memory on the system remains pretty constant at about 1GB available (out of 1.5 GB total physical). When trying to export the report to PDF the available memory fluctuates between 350MB-1GB available, and eventually dies. I also tried giving the machine 2GB of physical memory, but ran into the exact same error. Rendering to other formats like T


View Complete Post


More Related Resource Links

Export to excel giving com Exception.

  
HI All, I am using following code to export content of my grid to excel sheet. Excel. _Worksheet worksheet = (Excel.Worksheet)excelApp.Sheets.get_Item(1);   int columnIndex = 0;   foreach (DataGridViewColumn col in dg.Columns) {   if (col.Visible) { columnIndex++; worksheet.Cells[1, columnIndex] = col.HeaderText;   //Excel.Range is used to set a style and other format information for a cell in excel. Excel. Range rng = (Excel.Range)worksheet.Cells[1, columnIndex]; } } This works fine when I have small amount of column around 200. Sometime I need to show 900 columns in my gird and when I try to export the context of the grid to excel, I get exception saying "Exception from HRESULT: 0x800A03EC" StackTrace says:    at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)    at Microsoft.Office.Interop.Excel.Range.set__Default(Object RowIndex, Object ColumnIndex, Object )    at XYZ.ExportToExcel.Export(DataGridView dg) The exception occurs when the columnIndex value becomes 257. Is there any limit of number of columns and rows that can be exported to excel sheet? If possible, please share the code which will resolve this problem. Thanks in advance    

SSRS 2008 Export to PDF fails for large data with System.Exception: Parameter is not valid

  
Hi, We are working on Range Bar Chart using SSRS 2008. The report has huge data. It is properly displaying the data, but when we tried to export to pdf it is failing with the following exception. Exporting to excel works fine. Also if the report has small/medium data it is property exporting to PDF. It is failing only in case of huge data (we have custom page size of 28" X 14"). Of course the report has lot of expressions we used to customize the colors/text as per our requirements.   Server Error in '/Reports_SQLDEV2008' Application. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Parameter is not valid. Source Error: 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. Stack Trace:   [Exception: Parameter is not valid.]   [Exception: An error occurred during rendering of the report.]   [Exception: An error occurred during rendering of the report.]    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream ou

System.Out of Memory Exception

  

I'm running SSRS 2005 on a 2008R2 64bit server with 12GB of RAM.....I must have one heck of a crappy query to run through 12GB of RAM.....where do I check how much memory is being allocated to SSRS?

Thanks.


Cache Transform throws out-of-memory exception

  

I'm using a cache transform in a dataflow to reuse a large lookup ref data (around 1.5M records). However getting out-of-memory exceptions midway in the execution. I did monitor the memory usage and it was just above the 50% usage on the dev machine where I was testing this package. On the same machine, I then reverted to using the lookup cache with full cache. The lookup component did not throw any exceptions although the pre-execute took (as expected) around 15min. Is there a memory issue with the Cache Transform ?

Here is the exception:

Error: 0xC0047012 at Populate Cache LOOKUP_REF: A buffer failed while allocating 10479040 bytes.
Error: 0xC0047011 at Populate Cache LOOKUP_REF: The system reports 60 percent memory load. There are 3740508160 bytes of physical memory with 1478172672 bytes free. There are 2147352576 bytes of virtual memory with 216399872 bytes free. The paging file has 5713952768 bytes with 2810195968 bytes free.
Error: 0xC0208252 at Populate Cache LOOKUP_REF, Refresh REFERENCE_DOMAIN_VALUE_SK [37]: Unable to allocate memory for a new row for the main workspace buffer. An out-of-memory condition occurred.

 


http://bennyaustin.wordpress.com

uint[300* 1000 * 1000] = out of memory exception when I have 4GB of Free RAM from 6GB total.

  

This is really odd, but, I get this memory out of exception at array initialization.

uint[300* 1000 * 1000] = out of memory exception when I have 4GB of Free RAM from 6GB total.

300million uint is only 1.2GB, so why am I gettin the error? And strangely sometimes I don't get the error. No GC related since this is what my app does at begining. I haven't done anything else yet. And I sometimes get the error or no error by re-complie and re-debug the app. And same thing happens if I make three different uint[100 * 1000000];

What is going on? I actually want to spend 2GB of RAM, which is 500million uints. But, I couldn't even use 300million. And I have plenty of free RAM.

Thank you.


SSRS 2005 Report timeout, Memory out of Exception

  
The .net code is executing the ssrs ".rdl" file from the ssrs report viewer.
When the report viewer executes the ".rdl" report file below error is displayed.
----------------------
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
-----------------------

SSRS 2005 report.
The report displays 10,000 of records successfully, but when the report is supposed to display lakhs of records, the report gets time-out.

I have tried the below changes but still the timeout occurs.
1) In Report manager have selected the "Do not timeout report execution" option.
2) In Machine.config changed the <processModel autoConfig="true" />
to <processModel autoConfig="true" memoryLimit="120"/>
3) In rsreportserver.config changed "MemoryLimit" and "MaximumMemoryLimit" to 120 and 160 respectively.

I had also set the timeout=0 in the sql connecti

uint[300* 1000 * 1000] = out of memory exception when I have 4GB of Free RAM from 6GB total.

  

This is really odd, but, I get this memory out of exception at array initialization.

uint[300* 1000 * 1000] = out of memory exception when I have 4GB of Free RAM from 6GB total.

300million uint is only 1.2GB, so why am I gettin the error? And strangely sometimes I don't get the error. No GC related since this is what my app does at begining. I haven't done anything else yet. And I sometimes get the error or no error by re-complie and re-debug the app. And same thing happens if I make three different uint[100 * 1000000];

What is going on? I actually want to spend 2GB of RAM, which is 500million uints. But, I couldn't even use 300million. And I have plenty of free RAM.

Thank you.


How to isolate an out of memory exception

  

Hi... hope this is the right forum.

I'm getting this error:

Out of Memory exception in SQL 2008

  
Hi
    I am running data warehouse stored procs on SQL 2008 and after a while I get this error message
An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.

If I run teh exact same process on Sql 2005, there is no such message taht comes..
There is a lot of data and lots ofprocessing going on
How can I take care of this.
Thanks
-Sarah

System.out of memory exception in sql server 2005 repoting services

  

hi,

this is ram,

I am new to the reporting services,just one month back i joined in the company.there i got trained in ssrs 2005 .

nd my pblm is i inserted one of the csv file into the sql server 2005,it contains 102866 records,nd then i started generating summarized record through sql server 2005 reporting services.when i started generating the reports with few columns i didnt get any pblm,but when i started including more columns with aggregate functions i am getting the ecxeption called system out of memory exception.and by google search i found some solutions like enabling the AWE,but still i am getting the same exception

my server configuration is

64 bit windows server 2003,

4GB RAM

SQL SERVER 2005 STANDARD EDITION

PLEASE HELP ME OUT IN RESOLVING THIS ISSUE,I WILL BE VERY THANKFUL TO YOU,

THANKS IN ADVANCE.

 




Export Visio Database Table Names to Excel

  
If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

EXCEPTION HANDLING IN C#

  
Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.

Global Exception Handling with ASP.NET

  
After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

Export SharePoint List to Excel Spreadsheet Programmatically using C#

  
In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

How to detect and avoid memory and resources leaks in .NET application

  
Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

SQL Server 2005 Try and Catch Exception Handling

  
I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

Configuring Profile Image Export in SharePoint 2010

  
It's no secret that I am thrilled with the new social features of SharePoint 2010. I am most excited about the new Profile Picture handling. I strongly believe that the more we can show the faces of our colleagues to one another the more connected we will feel. Clearly Microsoft feels that way as witnessed by the many features that make use of the Profile Image like the Activity Feed and Colleagues list
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend