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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting and Memory problems

Status
Not open for further replies.

jkb17

Programmer
Nov 27, 2000
156
US
Hello.

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

 
Unfortunately I had that problem when I was exporting reports in RTF format as well. It only went away when I switched to excel and dropped the RTF completely. It was a nightmare and no one could tell me why either. My program was very similar to your except that we were trying to export the report to both RTF and excel format so our users could choose which they wanted to use. Due to the non-standardized formats of exported reports and the filesizes of the RTF reports, we opted to just go for Excel. Good luck to you though. If you find out the problem, please post it.


Sorry I wasn't more help,
CrystalVisualBOracle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top