This is a migrated thread and some comments may be shown as answers.

Errors creating large number of reports in batch

1 Answer 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Betsy
Top achievements
Rank 1
Betsy asked on 04 Mar 2011, 09:37 PM
I have an invoicing processing that loops through and generates multiple (200-300) reports.  My report is a main report that contains 5 subreports.  My main report has 3 different background images, one on the Report Header, one on an unbound group header and then one for the Report (which displays for every page but the report header and the 1st group header).  Each image is a png file that fills a 8x11 page.

Currently I create a new report object for each invoice.  I have a shared ReportProcessor that I use to get each report as a pdf file in a memory stream and then store the document in the database.  Then I either email or fax the memory stream OR print the original report object.  I ran into problems last month where after 10-20 report I got an Argument exception and it mentioned the BackgroundImage property.  Unfortunately I cannot remember the exact error or reproduce it without printing all the reports.

Any ideas or suggestions?  Can I share a report processor like that?  Should I recreate the report each time?  I will try and re-generate the error by pausing the print queue and letting the code go through the steps.

Example code:
Dim rp as new ReportProcessor, r as InvoiceReport, ms as MemoryStream
for each itm in list( of items)
     r=New InvoiceReport
     rp.RenderReport("PDF", r, Nothing)
     'database save code
    Select itm.SendFormat
       Case email,fax
            'do email/fax processing with memory stresm
       Case paper
            rp.PrintReport(r,settings)
    End Select
    r.dispose
    ms.dispose
   

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Mar 2011, 04:58 PM
Hello Heather,

The information you have provided is insufficient for us to determine what/where is the problem you have encountered. We would appreciate if you post the exact error with full stack trace. The fastest way to get to the bottom of it, would be to prepare and post a runnable sample project in an official support thread.

Best wishes,
Steve
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Betsy
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or