cancel
Showing results for 
Search instead for 
Did you mean: 

How to Print the whole view content from a button on the View Layout

Former Member
0 Kudos

Dear All,

Good Morning All

I am New to WebDynPro.Solution needed Urgently

How to take print whole view content(lay out) in

webdynpro application.i.e whatever it may be tablecontent or label or inputfield .

Could you send the coded part briefly step by step from the beginning itself i.e

i put the button in the view lay out below the printed parts(label or inputfield) name like show preview .

Now my Question is what should i write in show preview function to take the print in label fields in the webdynpro view lay out

B'cos i am new to webdynpro.Help me

Thx in advance

Regards

Dhinakar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi dhinakar,

Printing the view is not supported. there is a workaround

see these links

Regards

rohit

Former Member
0 Kudos

Web Dynpro by default does not provide the option of printing the view content.

However still you have a round about way of doing it. Create the an html page similar to the Web Dynpro page. Store the code into a String variable.

String html="<html> ....<scripts>window.print()</scripts></html>";

bytes[] source=html.getBytes();

try{

byte[] b=new byte[1];

IWDCachedWebResource res=WDWebResource.getWebResource(b,WDWebResourceType.HTML);

String url=res.getURL();

}catch (WDURLException e) {

// TODO: handle exception

}

Now open the url in a new window and that would print the content of the html page.

Regards,

Noufal

Answers (0)