rsilverns.sympatico.ca Posted October 7, 2006 Share Posted October 7, 2006 Is this possible? I have seen on the forumns that people were unable to do it unless they used a tool in iText to merge the pages, but with page numbering this really isn't a good way to do it. My context is that my report is of a known format... Page 1 : (Portrait) covering letterPage 2 : (Portrait) summary page (user details summary, not data summary)Page 3, 4, etc: (Portrait) "Dynamic data in detail sectionPage n: (Landscape) Final summary page, in landscape (this page has to be in landscape, will not fit in portrait in asthetic fashion). Has a chart or two and some images etc. I am hoping that there is an easy way to have the required pages be in alternating orientations without having to use an external tool. The report is integrated into a website using a hibernate datasource and I am hoping to avoid having any overhead or extra work incurred outside the report (i.e. needing to use iText to merge documents etc) Any comments on this issue are appreciated (including the best workarounds possible should it not be possible). Thx,Rob Link to comment Share on other sites More sharing options...
enderfake Posted October 7, 2006 Share Posted October 7, 2006 I'm having the same exact problem. Looking around I found this on the forums... By: jj1978 - jj1978RE: Using portrait and landscape in single report2006-05-21 18:18Yes it is possible! eg: My report page 1 (jr1) is portrait and page 2 (jr2) landscape. JasperReport jr1 = (JasperReport)JRLoader.loadObject( ... );JasperReport jr2 = (JasperReport)JRLoader.loadObject( .... ); JREmptyDataSource ds = new JREmptyDataSource( 1 ); JasperPrint print1 = JasperFillManager.fillReport( jr1, new HashMap(), ds );ds.moveFirst();JasperPrint print2 = JasperFillManager.fillReport( jr2, new HashMap(), ds );List l = new ArrayList();l.add( print1 );l.add( print2 );JRPdfExporter exp = new JRPdfExporter();exp.setParameter ( JRExporterParameter.JASPER_PRINT_LIST, l );exp.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, SAVE_LOCATION );exp.exportReport(); I cannot seem to get this to work with JRPrintServiceExporter as of yet for actual printing (it prints only the first jasperReport, then fails to print the rest in the list), however you might have some luck with it. If you find another solution or someone can help it would be much appreciated. Thanks. Link to comment Share on other sites More sharing options...
teodord Posted October 16, 2006 Share Posted October 16, 2006 Hi, JasperPrint objects do not support mixed page format.So the only solution would be the batch export functionality mentioned. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 16, 2006 Author Share Posted October 16, 2006 Thanks Teodor!Edit:To achieve multiple page layouts for reports I did 2 different methods..1. No Post Editing Was Needed:Used pure jasper, as described above:Code:2. Post Editing Required:-e.g. To add page numbering in header.-Used iText) wrote a program to merge the pages and manually insert page numbering on the pages.Code:Incidentally Teodor/Lucian, is this type of functionality on the horizon for jasper reports? Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 18, 2006 Author Share Posted October 18, 2006 To add some more complexity to this issue, I am integrating this report into an AppFuse/Spring framework. To achieve this integration I am thinking I will need to create a custom Spring JasperReportsPdfView which will do the manual merging of the pdf file into an output stream to be returned to the browser for download. Has anyone ever done anything similar? Lucian/Teodor any word on having portrait and landscape pages in PDF and other exporters is going to make it into a release of Jasper anytime soon? Thx,Rob Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 23, 2006 Author Share Posted October 23, 2006 After you do the manual merge, what about returning the stream to the browser when they click on a link, and have it be type/pdf for content. It is not a "preview" per se.. but may do the trick. That was going to be my approach once I reached that stage on this report/project. HTH,Robin Link to comment Share on other sites More sharing options...
prashanth.talkad Posted March 18, 2008 Share Posted March 18, 2008 also, has anyone tried to interleave portrait and landscape pages - for example, if i have a report with 2 pages, one to be printed in portrait mode and the other in landscape mode - and the query returns N rows - for my design, its printing N portrait pages forllowed by N landscaped pages. I wanna print interleaving portrait/landscaped pages thats easy when an end user prints the report. One way lucian suggested is to write my own exporter - which i dont have time for at this moment.any other suggestions lucian? thanks in advance. Link to comment Share on other sites More sharing options...
teodord Posted July 6, 2009 Share Posted July 6, 2009 Hi, It would be greate if you could log a request for enhancement on the project trackers. This would allow us to refine the requirement and come up with a solution that suits more people.Please give as many real-world use case scenarios as possible, so that we better understand this need of having variable page layout and size, inside a document. Why is that the batch exporter functionality already existing in JR is not enough? Thank you,Teodor Link to comment Share on other sites More sharing options...
mukeshsheoran07 Posted April 12, 2011 Share Posted April 12, 2011 Hi Lucian/Tedor,As you said, this was the only solution to have mixed orientation report. I did the implementation as suggetsed here and get the report as expected in PDF format.But when I tried the same using JRRtfExporter, I come across one issue. Although the data and formatting was exported successfully, but when I opened the report using Word, all the pages were in Portrait orientation.If I manually changed the orientation of the particular page, reports looks fine with desired orientation. But as this can not be expected from the end user, can you give any suggestion to have correct output while using RTF export.As requirement is very urgent, any help is higly appreiciated. Link to comment Share on other sites More sharing options...
maruthu.u Posted November 27, 2019 Share Posted November 27, 2019 https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v610/creating-report-book-framework follow this link. Use Wave Book 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