Number of copies with setCollated does not work if PageRange is not set

I have a report which results are printed on 2 pages. If i set PrintReportOptions like below:
PrintReportOptions printOptions = new PrintReportOptions();
printOptions.setPrinterName( targetPrinter );
printOptions.setNumberOfCopies( 2 );
printOptions.setCollated( true );
printCntrl.printReport( printOptions );
I get ONLY one copy, other pages are not printed.  So instead of getting 2 x 2 pages with order 1,2 1,2 i am getting only 1,2 so it seems that number of copies is not interpreted.
When i  add a setup of a page range - everything works as excepted.
PrintReportOptions printOptions = new PrintReportOptions();
printOptions.setPrinterName( targetPrinter );
printOptions.setNumberOfCopies( 2 );
printOptions.setCollated( true );
PrintReportOptions.PageRange printPageRange = new PrintReportOptions.PageRange( 1,  2 );
printOptions.addPrinterPageRange( printPageRange );
printCntrl.printReport( printOptions );
But how can i find on how many pages report will be printed? - it's impossible. I thought that maybe i can set 100 as the upper limit of range but this doesn't work. The page range must be less or equal to the number of pages on which report will be printed.
When I am not using method setCollated or use it with false  report is printed on desired number of pages and with expected amount of copies.  ( in order 1,1 2,2 ) . Here is the code:
PrintReportOptions printOptions = new PrintReportOptions();
printOptions.setPrinterName( targetPrinter );
printOptions.setNumberOfCopies( 2 );
printOptions.setCollated( false );
printCntrl.printReport( printOptions );
I suspect that this is a bug of CR Java runtime. If so, when we may expect that it will be fixed?

Hello.
I tested with the latest version of the Crystal Report runtime libraries (version 12.2.211) and it works for me as expected.
What I would suggest is that you test your application using the latest version 12.2.211 and see if this resolves the problem.  Since it works for me on this latest version, I would expect that it would work for you as well.  The latest version can be found at the following link under the section "Runtime Libraries":
http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp
A direct link to the zip file that contains the runtime components can be obtained from the following link:
http://downloads.businessobjects.com/akdlm/crystalreportsforeclipse/2_0/crjava-runtime_12.2.211.zip
If you are still experiencing problems after using the 12.2.211 runtime components, then maybe it is the case that your printer driver is causing an issue.  The printer that I printed on is "HP Universal Printing PCL 5 (v5.1)".
I hope that updating the Crystal Reports runtime version to the latest resolves your problem.
Best of luck.
Regards.
- Robert

Similar Messages

Maybe you are looking for

  • Please!!!!!!   How can i add rows in html table dynamically [use jsp,bean]

    hello, i am a fresher in jsp. i want to add new rows in html table dynamically.In my coding, just only shows in one row . please help my problem with correct coding and i don't want to use database. Thanks ...............! Here is my coding----------

  • Transformation of german characters using xsl

    Hi, I have an xml which contains german characters .. i apply an xsl on the xml to get an html output using xalan. and the german character is converted to "?". When i try converting this using a stand alone java client class it successfully transfor

  • Toolbar icons just keep magically reappearing....

    Quite possibly related to my continuing saga of how to get FF to sync reliably between my devices (thread: here http://tinyurl.com/k6p3s37), I deleted all the misbehaving icons. That seemed to solve 95% of the problem, at the cost of deleting the boo

  • Project Management ' unable to delete project set'

    Hi we are using oracle11i (11.5.10.2) on windows 2000 server service pack 4,database version 10.2.0.3 and Oracle Project patch set Level 11i.PA.L while deleting prject sets we are getting error 'you have gained access to this page using the browser n

  • External HD Boot fails with Snow Leopard

    When I try to boot from an external HD with 10.6 installed I get a kernel panic "unable to find a driver for this platform". My internal drive has 10.7 installed. Any suggestions as to how to resolve the issue? Here's a bit of background. I have some