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

Landscape reports with Jasper


ktrinad

Recommended Posts

By: Elana Schilz - elana101

Landscape reports with Jasper

2004-02-16 00:24

when printing with landscape the left margin is always cut.

 

I've put in

 

pageHeight=595

pageWidth=842

leftMargin = 20

rightMargin =20

 

..and then my (for eg.) line

...x="0" y="10" width="800" height="0"

 

and the left of my printed page is cut off??

How do I correct this???

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Landscape reports with Jasper

2004-02-16 03:07

 

Hi,

 

Try the /demo/samples/landscape example provided.

Does it get cut the same way?

 

I hope this helps.

Teodor

 

 

 

By: Elana Schilz - elana101

RE: Landscape reports with Jasper

2004-02-16 03:17

I have tried the landscape sample and it still cuts the left off.

I also tried to print a portrait report to see if the same thing would happen and it printed out fine.

 

I have shuffled the co-ords around to make it fit but I don't feel that is the solution.

 

eg pageWidth="842"

pageHeight="595"

leftMargin="30"

rightMargin="10"

 

...and then fit in the text/lines/rectangles etc accordinly...

 

Should I just do that???

 

 

 

 

 

By: Kristian F. Jensen - kristianfoege

RE: Landscape reports with Jasper

2004-02-24 04:10

I've experienced problems printing out landscape format, too. I solved my problem by printing out using the JasperExportManager (exporter.exportReport();) instead of the JasperPrintManager. It may work for you, too.

 

Kristian

Link to comment
Share on other sites

  • 2 years later...
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Hi kris,

How to use JasperExportManager..

 

I just replaced exporter.exportReport() with the code you have mentioned "JasperExportManager (exporter.exportReport()); "

 

I get excpetion -  Generated servlet error: The method JasperExportManager(void) is undefined for the type myreport_jsp

Can you please guide on how to use this method? any packahe to import? am i going on the right track..

please help to fix this..

i want to set landscape option during print...have set it in ireport properties,thru jsp code jasperPrint.setOrientation(..),also tried changing widht and height..still the problem is not resolved...

waiting for your reply at the earliest..

 

thx,

Ani

 

Link to comment
Share on other sites

honeyani
Wrote:
 

Hi kris,

How to use JasperExportManager..

 

I just replaced exporter.exportReport() with the code you have mentioned "JasperExportManager (exporter.exportReport()); "

 

I get excpetion -  Generated servlet error: The method JasperExportManager(void) is undefined for the type myreport_jsp

Can you please guide on how to use this method? any packahe to import? am i going on the right track..

please help to fix this..

i want to set landscape option during print...have set it in ireport properties,thru jsp code jasperPrint.setOrientation(..),also tried changing widht and height..still the problem is not resolved...

waiting for your reply at the earliest..

 

thx,

Ani

 

To overcome the exception i updated code as below

JasperExportManager.exportReportToPdfFile(jasperPrint,"C:/myreport.pdf");
 response.setContentType("application/pdf");

 

But still when i open the generated report and view the print properties..it shows portrait...still...but it should be set to landscape ...does iReport support this?

 

Link to comment
Share on other sites

  • 2 years later...
  • 3 weeks later...

i am using JasperPrintManager.printReport(jasperPrint, false); in struts

environment.

bt here when i am calling from client the print is invoking the server

printer unlike using local resource(printer).

can u find me the solution for this its very very damn urgent for me

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...