on 09-14-2007 2:50 PM
Hi all
I'm having difficulties adding the functionality to print a report (a table) in web dynpro
What I've done so far:
I've created a view with a 'print' button
I've linked the print button to a action called 'onActionPrint'
I've created a controller context value called 'urlToPrintPage' and linked it to my view's context. The variable is of type string
I've created a html page with the following code (printing.html):
<html>
<head></head>
<body>
<button onclick="window.parent.print()">Print</button>
</body>
</html>
I've copied the printing.html file to MyProject/src/mimes/Components/MyComponent/printing.html (locally and not onto the server since I would think that the printing.html would be deployed as well)
Within the 'onActionPrint' method I've placed the following code:
wdContext.currentContextElement().setUrlToPrintPage("/path/to/where/this/file/is/located/printing.html");
From a previous thread which is answered (message id: 3314996) the contributor used the url:
wdContext.currentPrintElement().setAtrURL("/irj/go/km/docs/documents/print/print.html");
I assume that the currentPrintElement would be the same as using the currentContextElement and that setAtrURL would be the same as setUrlToPrintPage in my case?
The file gets deployed to:
C:\usr\sap\J2E\JC01\j2ee\cluster\server0\temp\webdynpro\web\local\MyProject\Components\com.lonmin.bns.view.webdynpro.MyApplication\printing.html
I tried to access the file with an absolute url, but no joy (anyways the url looks like a temporary one...)
Could anyone please help to clear my understanding of this printing sollution?
Regards
Anton
Hi,
Try this:
<b>wdContext.currentContextElement().setUrlToPrintPage("printing.html");</b>
Warm Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is unanswered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.