on 04-18-2007 5:44 PM
Hi All,
I know this issue is discussed earlier. I am using NW 2004s SP 10.
Is there any new feature which allows us to print the view content.
My requirement is I have a view in which user enters data. I provide a print button when user clicks this,
a new external window(with all the element and data of the present window) should popup and browser print function should be invoked.
1)Modalwindow is good for this but it should open in a new browser.
2)If I use createExternalwindow() how to share data from present window. Because it is a new applicaiton.
3) How to invoke browser print function.
Please give me some detailed explanation. Points will be awarded.
Thanks a lot in advance.
Joe
Hi,
Recommended way is to export the data in printable format (PDF/HTML/Excel) and then allow user to print.
Regards,
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
See if this blog is of any use for you.
/people/community.user/blog/2007/08/20/open-views-in-non-modal-external-windows--the-patch-version
Thanks & Regards,
Sudhir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can open an External window with passing all the data in HTML format.And in the Button for print you can give window.print();
Regards,
Anish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreekanth,
<b>Create the context Variables</b>:
AttrUrl of type string
htmlfile of type binary
<b>Create an action called Print()</b>
In Print Action Declare a Variable byte[] content = null;
<b>Eg:</b>
public void onActionPrintFriendly(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ){
byte[] content = null;
content = ("<html><head><title>abc</title></head><body><form>The Title is::"+wdContext.currentDetailNodeElement().getTitle()+"<br><INPUT TYPE=BUTTON value=Print name=button1 onClick=javascript:window.print()>").getBytes("UTF-8");
wdContext.currentContextElement().setHtmlfile(content);
wdContext.currentContextElement().setAttrUrl(_contentType.format(content));
}
<b>Atlast define the Attribute</b>:
ISimpleTypeModifiable _contentType = null;
I hope this will help.
Regards,
Anish
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.