J
James
Should be an easy one for you veterans. Have a DataSet that I'm looping
through with a For Each loop. There are 500+ records in this DataSet. For
each record, I'm creating a PDF by exporting an ActiveReport. So the basic
logic flow is:
Dim rpt As Main = New Main ' This is the activereport
For Each dr In dv.Table.Rows
<set rpt values here>
rpt.Run(False)
Dim xPDF As DataDynamics.ActiveReports.Export.Pdf.PdfExport = New
DataDynamics.ActiveReports.Export.Pdf.PdfExport
xPDF.Export(rpt.Document, mStream)
pdfPath = Request.PhysicalApplicationPath & "\collection\temppdfs\"
& dr("List_ID") & ".pdf"
xPDF.Export(rpt.Document, pdfPath)
xPDF.Dispose()
Next
I'm only able to get about 200 through before it gives me an Out of Memory
exception. Seems like there is an obvious design flaw, and I'm just not
sure how to structure this so it "reuses" memory. Any thoughts?
Thanks!
through with a For Each loop. There are 500+ records in this DataSet. For
each record, I'm creating a PDF by exporting an ActiveReport. So the basic
logic flow is:
Dim rpt As Main = New Main ' This is the activereport
For Each dr In dv.Table.Rows
<set rpt values here>
rpt.Run(False)
Dim xPDF As DataDynamics.ActiveReports.Export.Pdf.PdfExport = New
DataDynamics.ActiveReports.Export.Pdf.PdfExport
xPDF.Export(rpt.Document, mStream)
pdfPath = Request.PhysicalApplicationPath & "\collection\temppdfs\"
& dr("List_ID") & ".pdf"
xPDF.Export(rpt.Document, pdfPath)
xPDF.Dispose()
Next
I'm only able to get about 200 through before it gives me an Out of Memory
exception. Seems like there is an obvious design flaw, and I'm just not
sure how to structure this so it "reuses" memory. Any thoughts?
Thanks!