Solved

"Page Setup" orentation to LandScape

Posted on 2003-12-04
4
260 Views
Last Modified: 2008-02-01
Hi
I have generated a report using JSP,and there are two buttons in that page
1, "Export to Excel" what it does is It Export the Report Data to Excel Format.
2, "Print" What it does is It format the report page by removing the Button etc.
now the Problem is client wants the "Page Setup" orentation to LandScape as default instead of (Potrait) for both the 2 pages(Export to Excel and Print).

any Idea how to do this through JSP.

Thanks
Naveeth
0
Comment
Question by:naveeth
4 Comments
 
LVL 3

Accepted Solution

by:
savalou earned 63 total points
ID: 9874523
People keep asking this question.  There's no way to even print with java/jsp code, first of all.  You'd have to use javascript in the final html document.  Secondly, even with javascript all you can do is bring up the print dialog, no more.  Tweaking with printer settings gets into platform/browser dependent issues and the javascript/css/html standards don't address it. You could probably do something in IE (you could probably reformat your disk in IE) but you'd have search and re-search the msdn site and you still wouldn't find any useful info.

0
 
LVL 14

Assisted Solution

by:kennethxu
kennethxu earned 62 total points
ID: 9874881
savalou is right that you cannot do this with javascript/css/html.

1. POI generates real excel document, I cannot be sure but you might have chance to page orentation with it. http://jakarta.apache.org/poi/

2. I used xsl-fo with FOP to generate pdf file, that for sure you can preset the orentation. http://xml.apache.org/fop/
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
String format issue 13 91
SimpleDateFormat.parse examples 19 93
how to hide hide popup page refresh second time? 10 123
how to add new optional parameter to JSP 1 41
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question