Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Printing from WebDynpro application

Hello all,

I've created a small WD application which entire purpose is to create several frames and insert in each frame a different WAD(BEx) report with different parameter.

I've also created an html file that creates a button that does window.print() and I added the file as the first frame.

I've done all this by adding the following code to wdDoModifyView:

String[] list = {"1", "2", "3", "4", "5", "6"};

IWDTransparentContainer root = (IWDTransparentContainer)view.getElement("RootUIElementContainer");

IWDIFrame frame = (IWDIFrame)view.createElement(IWDIFrame.class, "printButton");

frame.setSource("printButton.htm");

frame.setHeight("90");

root.addChild(frame);

for (int i = 0; list.length > i; i++) {

frame = (IWDIFrame)view.createElement(IWDIFrame.class, "iFrameTest" + i);

frame.setSource("http://xxxxxx/sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&TEMPLATE_ID=xxxxx&VAR_NAME_1=AYEARMON&var_value_ext_1=122005&VAR_NAME_2=STORE&var_value_ext_2="+ list<i>);

frame.setWidth("950");

frame.setHeight("950");

root.addChild(frame);

}

Now, my problem is that the "Print" button only prints the frame of the button... I've also tried top.print() and several other methods I've found while googling...

How can I print the entire page?

Thanks,

Yaniv

Not what you were looking for? View more on this topic or Ask a question