Skip to Content

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

Print thru XSL or XML

Hi all

i am struggling to take the print in webdynpro SO for,

i have tried the following code using your valuable help

Pls Guide me futher more.Nobody giving correct solution so for i.e Step by Step from the beginning itself

pls help us in this regarding

****The following code is the XSL Template

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="">

<xsl:template match="/">




<script language ="javascript">

function prin()








<form name="frm">

*********************Header Part Start

<table bgcolor="" cellpadding="10">

<tr><th align="left"><font color="#A52A2A">Name</font></th>

<th align="left"><font color="#A52A2A">Address1</font></th>

<th align="left"><font color="#A52A2A">Address2</font></th>

<th align="left"><font color="#A52A2A">State</font></th>

<th align="left"><font color="#A52A2A">Phone</font></th></tr>


********Header Part End

<xsl:for-each select="Dhina/Customer-Details">

***************Details Part Start


<td><font color="blue"><xsl:value-of select="CusName"/></font></td>

<td><font color="blue"><xsl:value-of select="CusAdd1"/></font></td>

<td><font color="blue"><xsl:value-of select="CusAdd2"/></font></td>

<td><font color="blue"><xsl:value-of select="CusState"/></font></td>

<td><font color="blue"><xsl:value-of select="phoneno"/></font></td>


***************Details Part End

</xsl:for-each >


<img src="C:/PRINT13.ICO" name="jd" onclick="prin)"></img>






First Page as usual Header part will print

I want to print the Header part details in the next page when the no of pages goes to more than one when we click the print button from The IFRAME UI Element.

Under the Header part, Details part should print like in MSword or Crystal report

************The following part in XML

<?xml version='1.0' ?><?xml-stylesheet type='text/xsl' href='Sample.xsl' ?><Dhina><Customer-Details><CusName>Dhina</CusName><CusAdd1>Add1</CusAdd1><CusAdd2>Add2</CusAdd2><CusState>TamilNadu</CusState><phoneno>99999</phoneno></Customer-Details><Customer-Details><CusName>Karan</CusName><CusAdd1>Add3</CusAdd1><CusAdd2>Add4</CusAdd2><CusState>TamilNadu</CusState><phoneno>11111</phoneno></Customer-Details><Customer-Details><CusName>Karthi Keyan</CusName><CusAdd1>Add5</CusAdd1><CusAdd2>Add6</CusAdd2><CusState>Karnataka</CusState><phoneno>22222</phoneno></Customer-Details></Dhina>


Pls Guide us how to control the Header and footer part in the IFrame and also can we control the

Page skip thru XSL

We have attached the Report Screen also

Pls reply as soon as possible



Former Member
Former Member replied


<i>also i want to print my own way of pageNo(top) and Date Time(Bottom)?</i> can do it ofcourse, but this would need printer support.

<i>i put the point to you</i>

I don't see the point

<i>i want to remove the the above part in my printed sheet in our own coding it possible?</i>

I need to look into this. I am not too sure.



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