Skip to Content
avatar image
Former Member

Charts in Crystal Reports stop appearing after memory usage increases

Hi,

We have a crystal report developed in Visual Studio 2010 Crystal version 13.0.8 (although customer is running 13.0.1 runtime). It has approximately 200 fields/labels, 5 levels of groupings, 5 charts for each grouping, 5 sub reports each with the same number of field/labels/groupings/charts as mentioned above.

There is certainly a lot of content, but the reason we want to do this is that sometimes a customer may want to vary what they see. For example, they may want to see a pie chart on the report, and other times they may want to see a horizontal bar chart. So we build in a lot of features and at run time let the users choose what they want to see and suppress the rest (including fields/labels, certain sub reports etc).

Recently we modified the fields to support html content, and we also added about 9 charts (including a cross tab between grouping fields) and we've started seeing the memory usage for the worker process in IIS start climbing rather quickly.

At a certain point, the charts on the report stop appearing (ie they are blank). If you continue to run the report, eventually you can get a "load report failed" or an "out of memory exception". In any of these cases, if you perform a recycle in IIS on the Application Pool that holds on your website, the worker process disappears, memory is released, and a new worker process starts and the charts start appearing again.

I have a few questions:

1. Is this by design? (ie do Crystal Report charts only produce if there is enough memory for them to do so?)

2. Is this a bug and planned to be fixed?

3. Is suppressing a section only changing the visibility of the section? For example, if there is a cross tab chart in a section, even though the section is suppressed, will the crystal report still be doing the work to produce the cross tab?

4. Is there anything else I could try to minimize the memory consumption for large report files (eg rpt file is 2MB in size)?

Thanks for your assistance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 11, 2014 at 02:24 PM

    Hi Brett,

    This may have been fixed in SP 10 and soon to be released SP 11. Although that fix was for images it may work for charts also.

    Download SP 10 and see if that helps:

    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads

    #3. Suppressed sections do not run until they are evaluated to be true

    Are you running your app in 32 or 64 bit AppPool?

    You can test this to confirm by running the report with and with out those suppressed charts, leave the section but delete the chart and see if memory is used in the same amount.

    Problem with Windows is it doesn't defrag memory space on the fly like UNIX OS's do. Microsoft even recommends to cycle IIS for this reason on a schedule. Crystal requires contiguous memory so fragmented memory is a problem.

    You could add more filtering, for example don't let the user return a Years worth of data, only allow a months worth.

    Exporting that much data may be a problem also but you could do a Data count and if large then only allow exporting/viewing in PDF format or something like that.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Don,

      Thank you very much for your response.

      We have tried installing the SP 10 run time, but it did not appear to make any difference.

      Our Web App runs in 32-bit mode and we realise (or at least expect) this means we can only draw on a limited amount of memory. We hope to recompile for both 32-bit mode and 64-bit mode as some of our customers only have 32-bit servers.

      We do configure IIS memory recycle on the Application Pool but it doesn't work very well because it recycle's way too often and if you are relying the worker process to remain alive for a minimum period to complete a task, it is recycled before it can finish (it may be a poor design, but that's what we have for the moment).

      It seems on some 64-bit servers, the virtual memory recycle limit doesn't work because by default, the server reserves as much virutal memory as it can which could be 16GB. This means no matter what memory limit you impose, it always meets the limit and triggers a recycle. The private memory recycle doesn't seem to work because the memory usage seems to go well above the limit and the recycle doesn't happen. It's very strange.

      I will try your suggestions about removing the charts to monitor the memory usage and let you know if it makes a difference.

      The problem for our customers is that they may choose to not use the filtering and they sometimes want a few years worth of data - I know this can be unreasonable but that's the challenge we face.

      Looking forward to trying SP 11, any idea when that will be available? And when will the list of fixes for SP 10, and SP 11 be available?

      Brett

  • Sep 11, 2014 at 04:12 PM

    Both you and the customer should be (I almost want to say must be) on the same SP. As Don suggested, SP 10 would be advisable.

    Also, make sure you close and dispose of the report objects as you get done with them.

    - Ludek

    Senior Support Engineer AGS Product Support, Global Support Center Canada

    Follow us on Twitter

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ludek,

      Thank you very much for your response.

      I agree with what you're saying. We're going to make sure our next release will include SP 10 and we will advise all of our customers they will need to install the SP 10. OR, we might wait until SP 11 comes out.

      Good point about disposing the Report Objects. I'm pretty sure we dispose them all, but will double check.

      Brett