Skip to Content
0
Former Member
May 13, 2006 at 05:54 AM

Print thru XSL or XML

17 Views

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"?>

http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">

<html>

<head>

<title></title>

<script language ="javascript">

function prin()

{

document.frm.jd.src="C:/emp.jpg";

javascript:print();

}

</script>

</head>

<body>

<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>

<hr/>

********Header Part End

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

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

<tr>

<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>

</tr>

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

</xsl:for-each >

</table>

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

</form>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

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>

*************End

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

Regards

Dhinakar