Can't print more than 75 reports... Load report failed

Hi,
I have a problem: I can't print more than 75 reports without restarting my application.
I'm using VB, Visual Studio 2005 and Crystal Reports Developer XI Release 2.
It's a windows application.
In the following examples I'm exporting to pdf but the same hapens if I put it on a viewer.
I tried to do some tests to find out the problem. I don't have a solution yet
Test 1:
I made a cycle printing 100 times the same report. I used the code from an example that was in the BusinessObjects website and just put it into a cycle. At 75 I get the error "Load Report Failed"
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
   at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
Dim ExportFolder As String = Application.StartupPath + "\export"
If Not IO.Directory.Exists(ExportFolder) Then
IO.Directory.CreateDirectory(ExportFolder)
End If
For i As Integer = 1 To 100
Dim crReportDocument As ReportDocument
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
''The path/location where the exported file will be saved
Dim exportFilePath As String = ExportFolder + "\exported" & i & ".pdf"
''Create an instance of the Chart report
crReportDocument = New Chart()
''Set the options for saving the exported file to disk
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = exportFilePath
crReportDocument.ExportOptions.DestinationOptions = crDiskFileDestinationOptions
crReportDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
crReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
''Export the report
crReportDocument.Export()
Next
Test 2:
I try to insert a "crReportDocument.Dispose() after the Export. It takes more than 1 minute doing the dispose and lots of time processing the 2nd report (more than 2 minutes)
Dim ExportFolder As String = Application.StartupPath + "\export"
If Not IO.Directory.Exists(ExportFolder) Then
IO.Directory.CreateDirectory(ExportFolder)
End If
For i As Integer = 1 To 100
Dim crReportDocument As ReportDocument
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
''The path/location where the exported file will be saved
Dim exportFilePath As String = ExportFolder + "\exported" & i & ".pdf"
''Create an instance of the Chart report
crReportDocument = New Chart()
''Set the options for saving the exported file to disk
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = exportFilePath
crReportDocument.ExportOptions.DestinationOptions = crDiskFileDestinationOptions
crReportDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
crReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
''Export the report
crReportDocument.Export()
' Dispose
crReportDocument.Dispose()
Next
Test 3
Same as Test3 but with ReportDocument.Close() before the dispose.
Still doesn't work, Close takes too long, just like Dispose...
Test 4
I tried using a global variable with the ReportDocument.
Instead of creating new instances of the ReportDocument, I keep using the same.
It works fine if I use always the same report file, but if I try to print 2 different reports the 2nd returns the error "Load Report Failed" and takes too long loading before the error.
Well, I made some researches on internet and I foud this, but still doesn't work with me, because Dispose always takes too long... 
http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2006/02/22/236.aspx
http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2006/05/23/328.aspx
http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2007/04/05/CrystalReportsMemoryLeakFixByJerryCote.aspx
Can anybody help?
Thanks
Isabel
Edited by: Isabel Cabral on Aug 12, 2008 8:12 PM

Already tried that, then I get another problem...
After exporting the first report, takes 1 or 2 minutes doing the Close and the Dispose, and after that it takes too long trying to load the next report (after 1 hour I give up!).
This is the code I'm using to do the tests:
        'Create the export folder
        Dim ExportFolder As String = Application.StartupPath + "\export"
        If Not IO.Directory.Exists(ExportFolder) Then
            IO.Directory.CreateDirectory(ExportFolder)
        End If
        For i As Integer = 1 To 100
            Dim crReportDocument As ReportDocument
            Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
            ''The path/location where the exported file will be saved
            Dim exportFilePath As String = ExportFolder + "\exported" & i & ".pdf"
            ''Create an instance of the Chart report
            crReportDocument = New Chart()
            ''Set the options for saving the exported file to disk
            crDiskFileDestinationOptions = New DiskFileDestinationOptions()
            crDiskFileDestinationOptions.DiskFileName = exportFilePath
            crReportDocument.ExportOptions.DestinationOptions = crDiskFileDestinationOptions
            crReportDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
            crReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
            ''Export the report
            crReportDocument.Export()
            'Close and dispose
            crReportDocument.Close()
            crReportDocument.Dispose()
        Next
Thanks,
Isabel

Similar Messages

  • Can you print more than one photo on a sngle page in iPhoto, as you can in Picasa?

    iPhoto printing--
    Can you print more than one photo on a single page in iPhoto, as you can in Picasa? Terrible waste of paper and time to do it one at a time!  I 've been away from Macs for several years ( I know, shame on me) but I thought I remembered more printing flexibility.  Help, anyone?

    Yes - select the photos and print - select the print size and paper size (be sure they will fit with some small borders) and click customize - in settings select multiple photos per page (the preview will reflect this selection) and print
    LN

  • Re: Can't print more than one page of a PDF

    I have Acrobat and Reader 9.3.3. With either program I can't print more than 1 page of any PDF despite changing settings. What will fix this problem? Thanks in advance for your help.

    Adobe strongly recommends that you should NOT have Acrobat and Reader installed on the same system. They have the bad habit on stepping on each other's files. You do not need both programs to read PDF files.
    You should uninstall Reader and repair Acrobat. I also recommend that you restart after removing Reader and after repairing Acrobat.
    Good luck.
    Ken Friedman

  • How can I print more than 16 lines in an invoice PLD

    Hello, Im currently using SAP 2007 SP1 PL09.
    I cannot print more than 16 lines in my PLD invoice. I have tried making the repetitive area longer, making the end of report and the page footer shorter, I tried setting the "lines in repetitive area" to 50 and I also increased the max rows per page and the only thing that seemed to work was setting the "print with vertical compression" in the invoice print preferences to a value under 100.
    is this the only way I can solve my problem?
    Thanks,

    Hello neito
    Jst increase the height of the layout go to doucment properties change the height there to 1200 and see u can get more than 26 records per page
    Regards Jenny

  • Can't print more than 1 on both my hp printers

    hi,
    I have 2 printers, an hp CP2025dn and a Photosmart C7280.
    Neither of them will print more than one of any document, no matter what I put in the box.
    It just started happening, I used to be able to print more than one copy.
    I am running windows 7 32 bit

    "Why wouldn't you be printing using a Epson C84 inkjet printer driver? (If you are trying to print to an Epson C84 inkjet)."
    We switch frequently between multiple printers connected for different print jobs--Laser, Color inkjet, and a Dymo label writer-- and having to go back to the Chooser to switch printers back and forth is tedious for the demands of our situation. We have had entire reports printed out on labels because a user didn't know how to use the Chooser or forgot to switch back. Using the LW8 driver in Classic makes all the printers available in a single place from a drop down menu and also allows for postscript file output easily (which is converted to a pdf file by an automator folder action). From a multiuser perspective, this is easier to use (and to teach) than dealing with the chooser and OS9 drivers. Unfortunately, there seems to be a one page limit with non-postscript printers and I would like to see if there is a way around this.

  • Can't print more than one job at a time.

    I am trying to print to either a HP DesignJet 1055cm plotter or a HP LaserJet 5000N. I can't send more than one file at a time. If i don't wait until the current job starts printing, the next one won't print. For example if I sent five files one right after the other, I might get 1, 4 and 5. I don't think it's a printer problem because it happens on two different printers, and it doesn't happen when I print from my PC. Any idea what could cause this?

    My work around is to put all the jobs "on hold" in the print settings or just "stop jobs" on the printer window.
    Then I click on each print job in the que and let them print one at a time. This way I can at least quit the program and move onto the next thing.

  • How can I print more than one slide per page from the iPad????

    Im having problems printing from the iPad. I want to print more than one slide in one peace of paper. 3, 6, 9 ...
    Can any one help?

    Start the print process and click on the Custom layout.  At the bottom you can set the size of the image desired and see how many photos can be placed on the page size selected.
    OT

  • I can't print more than 1 copy in Adobe Reader X

    I've recently come across an issue with a workstation that is unable to print more than one copy of a PDF file.
    When you increase the quantity to print multiple copies, it still just prints one copy only.
    I've downloaded the latest version of Adobe Reader but this has not corrected the issue.
    Any advice on this would be much appreciated.
    Regards, Mel

    I would be inclined to reinstall your printer drivers, if reinstalling Adobe Reader hasn't resolved it.
    Go to the web site of your printer manufacturer - then click on "Support" or "Downloads" to get the latest drivers.
    One thing you can try as an alternative is print to another printer and see if you still have the same issue - you can then narrow it down to being an Adobe problem or a printer software problem.
    If you don't have another physical printer installed, check to see if you have  a virtual printer like "Microsoft XPS Document Writer" or "Microsoft Office Document Image Writer".
    Both of these 'virtual' printers will print your document as a file that you can view on screen which is good for testing purposes. If you have the same problem with another printer or one of these virtual printers then the problem may be with Adobe Reader.
    What happens when you print other types of documents such as Word documents?

  • Can you print more than one copy from eprint.

    Does anyone know how to print more than one copy from eprint?

    Hi JJSS,
    Currently, the solution only offers one copy. If you need to print multiple copies, the workaround is to send the email multiple times.
    I work for HP.

  • How can I print more than one page of an internet site?

    When I try to print pages from internet sites (Facebook, Merchant Circle, Linked In, NBC.com, etc.), Firefox will only print the first page.
    In order to print more information, it is necessary to reduce the scale of the print so more of the information will print on the first page.
    How can I print out more than just one page of a website without having to make the print so small that I cannot read it when it prints?

    Firefox has problems with some style rules.
    First, it's always helpful to use any print-formatted or print-optimized version of the page. Sometimes there is a link for this.
    Second, in some cases you need to use this trick: press Ctrl+a to select all content on the page, then Ctrl+p to display the print dialog, and click the radio button next to Selection.
    Those tricks don't always work, but hopefully they will help.

  • Can't  print more than once with my epson epl-5800L  and airport express

    I recently bought an airport express (b/g) in order to use it with my epson usb printer epson epl-5800L. I'm running mac os X leopard 10.5.7 on my macbook pro (2.4 ghz). The printer is plugged into the airport express (firmware 6.3).
    My problem is the following : i can only print one job (one document), after that if i want to print a second document, the printer don't accept the print job...and the print status windows shows the following message "Unable to open device (read failure)!". The only solution to get it printing again is to reset the Airport.
    I downloaded and reinstalled the last 10.5 driver from epson site, this didn't result in any success, the problem remain, it's even worse now the application office word quit unexpectedly if i try to print through airport express. The error message say "The application escpageASTool quit unexpectedly".
    The problem seems only related to airport express via Bonjour protocol, because if i connect the printer directly to the usb port of my macbook pro i can print without troubles. Also, as reported from many forums Tiger 10.4 seems not concerned by this problem.
    Any help would be much appreciated!
    Thanks,

    I found this statement - +"Note: AirPort Base Station and Time Capsule printer sharing is for printing only, not for printer utilities or other special features that may require a direct proprietary connection."+ within http://support.apple.com/kb/TS1253. Not sure if it pertains exactly to your issue.

  • Can we add more than one interative report in one page

    Hi all,
    Can i add two interactive reports in one report region.
    Regards

    Hi Raoul,
    I want it because of this thread of mine
    Changing report dynamically
    If i get solution for the above mentioned thread of mine then i wont have to use two interactive report
    well my Apex version is Application Express 3.1.2.00.02
    can i use two interactive report in this? I want the condional only. I mean one at one time.
    Regards

  • I can not print more than page one of PDF file I have loaded with 2013 version Firefox; I am able to with IE. Vista Home Prem is my OS and I have a 64 bit Dell

    I have the most current version of MS Home Premium Vista. I run it on a 64 bit Dell Studio Laptop.
    I have just started suing Mozilla Firefox 2013 Beta version.
    I usually used Firefox vs IE as my browser and have my Yahoo email set as my home page.
    When I tried to print a a several page PDF file I was accessing using Firefox, all it it print previewed and ultimately printed was page one. This happened regardless of the PDF file (e.g. those on the IRS.gov website). When I switch over to Internet Explorer and try to read the same files, I have no problem.
    On 2012 versions of Firefox I had no PDF printing problem. I do think there is a bug in the latest version.

    Top left (Orange) Firefox button, Print, Print Preview. Does everything look correct? You may also click the icon that looks like a "DISK" to save, which allows you to save it to your computer and CTRL+P will allow you to print.

  • Can not print more than 32767 pages

    Post Author: JVega
    CA Forum: .NET
    We have develop an application using vb.net 2005 using Crystal Reports for .Net that is used to print returns with very large amount of pages. For some reason when the program generates a report with more that 32767 pages it displays ok in the ReportViewer but whe you try to print all the pages it just sends an error. I try using the PrintToPrinter method of the ReportDocument and it does the same thing, once I specify in the parameters to print a page greater than 32767 it just does not do it.
    I don't know if it has to do with the fact that a small integer or Short data type (int16) has a max value of 32767, but the specifications of the paramaters of the function PrintToPrinter are set as Integer not as Short...Help please!!!

    what do you mean by "stops to cool"?
    Are you referring to energy saving mode?
    Although I am working on behalf of HP, I am speaking for myself and not for HP.
    Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name : )
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly : )
    Happy Troubleshooting : )

  • Can't print more than 1 copy out of Photoshop 7.0.1

    the oddest thing has started, when I try and print out of Photoshop I can no longer change the number of copies, there is no response from the keyboard in the print dialog box. I can highlight the “1” but not change it either by overwriting it or by backspace.
    I am now printing out of 10.3.9 from the same copy of Photoshop and the same file.
    I can print mutiple copies out of preview with the same file saved as a JPEG.
    I once booted back to 10.4.2 from 10.3.9 and just the first time I could change the number of copies but as soon as I quit Photoshop and then reopened the file the same thing. Can’t change the number of copies.
    Rebooted 10.4.2 still can’t change the number of copies. Boot back to 10.3.9 all is fine.
    I’ve got this up at adobe forums but wondered if anyone had a similar problem with other software.
    I don’t remember this being a problem before but it’s also not likely I have tried printing multiples out of Photoshop after upgrading to tiger. (printing Xmas cards...)

    well this is the final word:
    this comes from the spellcatcher site, right at the top of their faqs...
    “I can't change the number of copies or page range in the Print dialog in certain programs!
    Author: Evan Gross
    This is a bug in Mac OS X 10.4.x (all versions as of Nov, 2005)
    Specifically, if an input method is active (almost any input method, including Apple's own that ship with OS X), you will be unable to edit these values in the dialog versions of Print and Page Setup. This is not a problem in the sheet versions of Print and Page Setup.
    Certain older applications still use these dialogs (AppleWorks for instance) instead of the more appropriate sheet equivalents. To clarify the difference, the sheet versions are "attached" to the actual document you are printing (take a look at, say, TextEdit), while the dialog versions appear modally in front of all document windows in applications that use them.
    The only work-around is to choose a keyboard (flag) icon from the input menu in applications that use these dialogs. Enter the number of copies (or page range, etc.), then once you're done choose Spell Catcher again from the input menu to activate its input method. Depending on which version of Mac OS X you use, this is easily accomplished with the standard command-space or command-option-space keyboard shortcuts.
    Once again, this is not a bug in Spell Catcher. To convince yourself, try the same thing with (say) Apple's Korean (Hangul) input method active. The result - a total mess.
    Again, we cannot fix or work-around this problem because it is a bug in Mac OS X (Tiger), and appears with almost all input methods. Tell Apple you'd like them to fix this if it's causing you grief.“
    you’d think this would be listed in apple’s support site somewhere! Grrrrrr!
    Now I want the many hours spent searching for a fix back!!!!!

Maybe you are looking for

  • How to add a field in a table control of the subscreen 6103 of tcode f-03

    hi abap gurus....i m new to abap and this is my first post ..i m hoping for a reply soon as it is urgent.... my requirement is to add a field PAYR-CHECF to a table control of the subscreen 6103 of tcode f-03

  • Oracle Warehouse Builder Question about Process Flow

    Oracle 11.1.0.7: We currently have various mappings and what we want is in process flow to fork and merge back and only if all those mappings are successfully completed then go further in the process flow. I see that it allows fork for parallel proce

  • Pattern alignment

    So I'm working on floor tile patterns with Illustrator. I love this program. The other day, I found (using the magical F1 key) that I can make a single 2-directional repeat of the pattern and make a swatch so I don't have to draw hundreds of rectangl

  • Rename problems in KM

    hi,all 1 is there such an operation like "copy as" ? then i can rename the file while pasting it. can i make some configration in "User Interface" or somewhere to do this? 2 when i new a file from template, in the folder "userhome" it allows me to re

  • Itunes buttons not working

    I just updated my itunes to 11.3.1 and when i went to play music i pressed the play button and it didnt work, same with the fast forward button and replay button. someone please help!