cancel
Showing results for 
Search instead for 
Did you mean: 

How to print the contents of the table in new page?

Former Member
0 Kudos

Hi,

I want to print my table contents in the next page by clicking on a button. ie., kind of a print preview. I'm using netweaver2004s.

Thanks & Regards,

Suresh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1)Create a new View, map the context node which is bound to the table to the context of this view.

2) Iterate throught the element and print them to the screen.

3) Embed this view to a window.

4) on click of the button open the newly created window.

Code to iterate through the nodes

for(int x=0; x< wdContext.nodeTest().size(); x++) // Replace nodeTest with yours

{

ITestElement nodeElement = wdContext.nodeTest().getElementAt(x);

nodeElement.getAttribute("TestAttribute"); //Replace with yours

nodeElement.getAttribute("TestAttribute"); //Replace with yours

}

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks for ur reply. You asked me create a view and map the node which is bound to the table. how to map the node to a view, i didn't get wat you are saying?

Iterate through the element?

sorry., could you please explain me in detail

Thanks & Regards,

Suresh

Former Member
0 Kudos

what he meant was

1) Create a new View with Table element

Map the context node created in the View to the datasource of the table

2) Iterate throught the element and print them to the screen.

3) Embed this view to a window.

4) on click of the button open the newly created window.