ktrinad Posted August 19, 2006 Share Posted August 19, 2006 By: Elana Schilz - elana101 Landscape reports with Jasper 2004-02-16 00:24when 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:17I 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:10I'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 More sharing options...
honeyani Posted November 19, 2008 Share Posted November 19, 2008 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 More sharing options...
honeyani Posted November 19, 2008 Share Posted November 19, 2008 honeyaniWrote: 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 belowJasperExportManager.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 More sharing options...
honeyani Posted November 19, 2008 Share Posted November 19, 2008 Hi friends...The option works..the printed document is in landscape format..but in print properties it shows portrait...If we get the o/p in landscape thts fine for us as of now..thxAni Link to comment Share on other sites More sharing options...
nagarjunabat Posted April 13, 2011 Share Posted April 13, 2011 Code:jasperPrint.setPageHeight(800); jasperPrint.setPageWidth(800); jasperPrint.setTopMargin(10); Link to comment Share on other sites More sharing options...
nagarjunabat Posted May 5, 2011 Share Posted May 5, 2011 i am using JasperPrintManager.printReport(jasperPrint, false); in strutsenvironment.bt here when i am calling from client the print is invoking the serverprinter 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now