Jump to content
We've recently updated our Privacy Statement, available here ×

Problem when printing report


augarte

Recommended Posts

Hi,

I have a strange problem when printing some reports. The problem is that I can't reproduce it because it only happens sometimes to one of the users. The escenario is the following one:

The user selects to print a report from our application. This action prints the jasperPrint object and generates the report in pdf format. The generated pdf is ok and the jasperPrint object too, but when sending it to the printer only a part of the jasperPrint object is printed. For example, I have a JasperPrint object with two pages, the first page is printed correctly but in the second one some content is missing. The method I use to print my object is the following one:

JasperPrintManager.printReport (MyJasperPrint, false);

It is really strange because I save my jasperPrint object and I view it with the JasperViewer and it is ok. I use the following method:

JRSaver.saveObject (MyJasperPrint, FilNam);

I know that the JasperPrintManager class has other methods to print my jasper objects but don't know if any of this methods will solve my problems. Another option is that the problem is with the machine/printer of this user because nobody else has reported me the same problem. Does anybody have a similar problem previously? Any idea of what could be happening? I'm a bit lost so any help will be really appreciated.

Thanks in advance.

Regards.
 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Shertage,

Thanks for your reply. I've used this function but for printing reports from a network printer specified by the user. In this case I need to print it from the default printer. What happens if you do not specify a printer name? Does it print the report from the default printer?

Thanks in advance.

Regards.



Post Edited by augarte at 03/09/2012 14:36
Link to comment
Share on other sites

Hi,

Ok, I'll try this option and I'll let you know.

Another posibility we have been thinking about is that the problem could be with the printer. If the user tries to print with any other printer it works of but if the default one is a multi-functional printer is failing in some cases. I'll investigate about both options.

Thanks again!

Regards

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

Sanda, I forgot to tell you what was the problem. After hours of investigation, we found out that the problem wasn't with jasper. Our client uses Citrix environment to run the application and the printers the user was using to print the jasper files wheren't supported by Citrix. So we think the problem is related to printers and everything is ok with jasper.

Thansk again and regards! :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...