ReportViewer Error, OutOfMemory

Problem

When you run a report, you get an error message that includes the following

“ReportViewer Error” and “Exception of type 'System.OutOfMemoryException' was thrown.”

Solution

This typically happens when the report contains too many images or very large images or both and is caused by a limitation with the Report Viewer. Below are some suggestions for avoiding this situation.

  1. Reduce the size of images before you import them

  2. Reduce the size of stored images for Parts and Colors

    1. Open the Parts or Colors form under Purchasing on the menu

    2. Click the ‘Resize Photos’ button on the top of form

    3. Enter in a Max Dimension in pixels and click OK. All stored images where the height or width is larger than the entered dimension will be reduced in size (maintaining the current height x width ratio) so that neither the height nor width will be larger than the entered size. For example if an image is currently stored at 1000 x 500 and the Max Dimension is entered as 500 the image would be resized to 500 x 250.

  3. Reduce Logos stored for Businesses

    1. Open Businesses and select a Business that has a stored Logo image

    2. Select the Logo tab and note the current size of the image is displayed above the image

    3. Right-click the image and use ‘Save As…’ to export to a file

    4. Resize the image file with an external application such as Paint

    5. Right-click the image and use ‘Change Image…’ to import the new or modified file