cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty in printing iViews from a page

Anmol_Kumar
Participant
0 Kudos

I have a WebDynpro project. Here in one page n number of iView's is present.

I want the data from one of this iView's to get printed. Either on this iView's should I create a link so that data of this iView's get populated to .pdf or .doc file or some other format.

Please share any other suggestion or tutorial, comment and it will be much appreciated. Thank you very much

Accepted Solutions (1)

Accepted Solutions (1)

Dheerendra
Participant
0 Kudos

hi, Anmol...

Just Use the following code for printing the IView's in Web-Dynpro Project....

-


try

{

//final String html = formattedStr;

for(int j=wdContext.nodePo_Items().size()-1; j>=0;--j){

wdContext.currentContextElement().setTable_data(wdContext.nodePo_Items().getPo_ItemsElementAt(j).mappedPo_ItemsElement().getPo_Number());

}

final String formattedStr = wdContext.currentContextElement().getTable_data();

final IWDCachedWebResource resource = WDWebResource.getWebResource

(

//formattedStr.getBytes("UTF-8"), WDWebResourceType.HTML

formattedStr.getBytes("UTF-8"), WDWebResourceType.HTML

);

resource.setResourceName("HTML_inline.html");

// resource.setAttachement( false );

// resource.setReadOnce( false );

wdContext.currentContextElement().setTable_dataOutput( resource.getAbsoluteURL() );

/* old -- start */

/*

wdContext.currentContextElement().setUrl

(

_contentType.format( html.getBytes("UTF-8") )

);

*/

/* old -- end */

}

catch (final Exception ex)

{

wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );

}

-


What I had here done is that just Create an Link To Url name Element in the I-View That Rendor all the data to a new Page and that data u can formett with the help of HTML n java Script..........

After that above coding will help-full 2 u.....This is just a sample code to u ....

Best Regard's

Dheerendra

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try this /message/1282998#1282998 [original link is broken].

Regards,

Pooja.