on 09-06-2004 6:17 AM
Hi,
In my BSP, there is a button used for printing the page. when user clicks on that button, that page should get printed on printer. Is there any function module to do it?
Regards
Jyoti.
Hi,
you can just use javascript function to do that.
see the sample below.
<htmlb:button id = "printButton"
text = "Print"
tooltip = "Click here to print"
onClientClick = "javascript:window.print()"
design = "small"
width = "50" />
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, to add on to Craig's mentioned printing problems:
In Internet Explorer, go to menu Extras -> Internet Options -> Advanced:
There look for Printing, and the Checkbox "Print background colors and images" - check this setting when/before printing your pages, to make sure you will get the right output.
Thanks Raja..
It worked.
Regards
Jyoti.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Didnt get the points.
Now you did
Yes, unfortunately the discipline to just close the loop is not always there. Soon changes in forum might make this easier (more intuitive) in the next many weeks. I am just tired of chasing people.
brian
PS: If you don't mind, I will put this answer into FAQ?
Print layout is a topic in its own right.
The best way to solve the issue is to define
a custom style sheet that you use in addition to the standard SAP stylesheet.
Define the style sheet and save it in the mime repository. (inline in each BSP is also possible)
when you linke the style sheet include,
you should specify <b>MEDIA = PRINT</b>
so that the stylesheet is only used when printing.
here an article on the web about this concept.
<LINK rel="stylesheet" type"text/css"
href="print.css" media="print">
http://www.meyerweb.com/eric/articles/webrev/200001.html
The CSS can be used to hide elements you dont want printed. And to move (to some extent) elements.
Do some research on on CSS on the web.
pay specific attention to the
"! important " attribute.
an example.
.classvalue
.anotherclass
but with the complexity of the underlying stylesheet
and classes defined, it can be a big job trying to re-align everything.
But changing the colors and other formatting features
is approachable.
good luck.
Phil.
ok, I didn't state my problem clear enough ...
I'm familiar with css and the possibilites you have with it - also that there is a parameter called "size" in printing (defining the page layout: portrait or landscape) defined for the CSS2 standard, but this parameter is not interpreted by any browser around.
So it's not the layout (displaying elements in different way) "within" the page, but the page layout itself - paper format so to say
I want to set printing format to landscape for my application.
So, is there some kind of pdf converter to use from within bsp application?
As I have only started with SAP software a few months ago, I do not have any experience other than my WAS, basic ABAP knowledge and some administrative use of a few SAP transactions outside WAS - so there might be something that a "regular" SAP developer should know which I haven't heard of yet.
Small addition to the example:
Scenario: When the print button is clicked if you want to print printable version of the page (stored separately) instead of the page currently showing
you could put the following tag in your <head> </head>
section of the page
<link rel=alternate media=print href="printableversion.htm">
Regards
Raja
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.