Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I posted my question below in the C

Status
Not open for further replies.

jkb17

Programmer
Nov 27, 2000
156
US
I posted my question below in the Crystal Reports forum but since I am workign with Visual Basic and I am having difficulty determining if its a VB problem or a Crystal Export issue - I decided to post again here.

Here it goes again...

Im working with Crystal Reports 8.0, the RDC component and SQL Server backend.

I have a report that is built off a sql server stored procedure that accepts 3 parameters. I have to schedule this report to run every week for a constant date range (e.g., the previous week - 1/22/2001-1/26/2001) where the 3rd parameter varies based on an areacode. There are 80 areacodes which means that this report will ultimately be run 80 times. Since this report is eventually distributed among the 80 areas, I have to export the results in a format that everyone can read. Excel didn't work well so we are using the Rich Text Format option.

In the Visual Basic App, I loop through a recordset object passing the appropriate area code as the 3rd parameter, I recreate the report and export.

Here is hte problem. I am getting out of memory problems and errors that are called "SmartHeap." At most, a single report can have 1200 records (this is not a lot and Seagate claims that this shouldn't be a problem). Also, the error doesn;t occur with consisitency. In other words, you would expect the 200 record report to export successfully while a report with more records (say , 1000) would fail. However, it is hit or miss.

Has anyone encountered this before and suggest some clean-up code that would prevent this problem?

thanks in advance.

Jim
 
Are you setting the RDC object variable to nothing after each report is run? If not there may be an instance of each previous report in memory, which would fill the memory up very quickly. After doing all processing for one report you should have a line like
Code:
Set Report(or whatever your variable is named) = Nothing
If you let CR create the report form for you when adding the RDC, this line should be in the Form_Unload event already. Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top