Print Page | Close Window

textboxes on sub reports generate memory error

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2826
Printed Date: 14 May 2024 at 10:21am


Topic: textboxes on sub reports generate memory error
Posted By: oaksong
Subject: textboxes on sub reports generate memory error
Date Posted: 04 Apr 2008 at 1:31pm
I'm not sure, but I'm beginning to think this may have to do with page events, and I've not been able to find documentation on this area.

The problem is that I've got a report with a subreport. The subreport is my report cover page. I'm using a  subreport because I've got 25 or 30 different reports that use the same cover page. The cover page gets it's content from user selections on a form.

I've been able to successfully transfer the information from the user form to the subreport using textboxes and it's displayed on the screen (with one small issue, the subreport ignores the font I've assigned).

Now, I go to print the report and I get a memory locked error in the code where I'm stuffing the textbox with a string. This occurs on the postback fired by clicking the print button.

Is there a way to print the report without re-running all the code in the postback? I added a variable to avoid running the code if it's already been run, but then the print view doesn't contain any of the information on the subreport. So it's clear that print apparently needs to re-run the entire setup stream.

I created a second copy of the report that has all the textboxes in the subreport embedded in the report header (Section1 - where the subreport resides) and the re-run did not fail. So it's only when textboxes are in a subreport that I encounter this memory error. I've already opened a case with Business Objects, but I'm hoping that there may be away around this so that I can use the subreport.



Print Page | Close Window