assuming you can implement jasperreports available at
http://jasperforge.org/plugins/project/project_home.php?projectname=jasperreports

build.xml would contain
<!-- put any all jars and classes into your classpath -->
 <path id="testclasses">
    <pathelement location="../../../../build/testcases" />
    <pathelement path="${java.class.path}" />
  </path>

http://jasperreports.sourceforge.net/api/net/sf/jasperreports/ant/JRAntCompileTask.html#setCompiler(java.lang.String)
<!--setup taskdef which will refer to global -->
  <taskdef name="jrxml" classname="net.sf.jasperreports.ant.JRAntCompileTask">
    <classpath refid="testclasses" />
  </taskdef>
<!-- and a testharness target which uses the jrxml parser -->
   <target name="testJRXML">
    <jrxml
src="AbsolutePathOfJRXMLFiles"destdir="AbsolutePathToPlaceDestinationFiles"compiler
 use one of the list from 
http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/design/JRCompiler.html
 (personally i like both BSH and Groovy compilers)
classpath="${java.class.path}"tempdir="temp"keepjava="true"xmlvalidation="true">
     >
    </jrxml>
  </target>

here is a sample Report Design jrxml input file with column headings you can 
use for a sample

<?xml version="1.0"?>
<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" 
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd";>
<jasperReport name="jasper_test">
  <!-- Our fields from the Person class. -->
  <field name="name" class="java.lang.String"/>
  <field name="lastName" class="java.lang.String"/>
  <title>
    <band height="50">
      <staticText>
        <reportElement x="0" y="0" width="180" height="15"/>
        <textElement/>
        <text><![CDATA[Struts 2 JasperReports Sample]]></text>
      </staticText>
    </band>
  </title>
  <pageHeader>
    <band/>
  </pageHeader>
  <columnHeader>
    <band height="20">
      <staticText>
        <reportElement x="180" y="0" width="180" height="20"/>
        <textElement>
          <font isUnderline="true"/>
        </textElement>
        <text><![CDATA[NAME]]></text>
      </staticText>
      <staticText>
        <reportElement x="360" y="0" width="180" height="20"/>
        <textElement>
          <font isUnderline="true"/>
        </textElement>
        <text><![CDATA[LASTNAME]]></text>
      </staticText>
    </band>
  </columnHeader>
  <detail>
    <band height="20">
      <textField>
        <reportElement x="180" y="0" width="180" height="15"/>
        <textElement/>
        <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
      </textField>
      <textField>
        <reportElement x="360" y="0" width="180" height="15"/>
        <textElement/>
        <textFieldExpression><![CDATA[$F{lastName}]]></textFieldExpression>
      </textField>
    </band>
  </detail>
  <columnFooter>
    <band/>
  </columnFooter>
  <pageFooter>
    <band height="15">
      <staticText>
        <reportElement x="0" y="0" width="40" height="15"/>
        <textElement/>
        <text><![CDATA[Page:]]></text>
      </staticText>
      <textField>
        <reportElement x="40" y="0" width="100" height="15"/>
        <textElement/>
        <textFieldExpression 
class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
      </textField>
    </band>
  </pageFooter>
  <summary>
    <band/>
  </summary>
</jasperReport>

The other alternative is to split off the input to known pieces with XPATH some 
relevant examples are located at
http://www.zvon.org/xxl/XPathTutorial/Output/examples.html

Viel Gluck,
Martin Gainty 
GMT+5(this week)
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Subject: Need help on <formatter tpe="xml"> tag
> Date: Tue, 19 May 2009 20:08:13 +0530
> From: [email protected]
> To: [email protected]
> 
> 
> Hello,
>  
> I need to add new column in the html report that is generated by <xslt> tag 
> after <chckstyle> and <formatter> tag in an ant script that is written for 
> generation of checkstyle report.
>  
> Could you please help me out and assist in how I can achieve this?
>  
> Any help appreciated :)
>  
>  
> Thanks.
> Kalyani
> Cell : +44 - 76 751 32 11
>  
>  
> 
> 
> This e-mail and any files transmitted with it are for the sole use of the 
> intended recipient(s) and may contain confidential and privileged information.
> If you are not the intended recipient, please contact the sender by reply 
> e-mail and destroy all copies of the original message. 
> Any unauthorised review, use, disclosure, dissemination, forwarding, printing 
> or copying of this email or any action taken in reliance on this e-mail is 
> strictly 
> prohibited and may be unlawful.

_________________________________________________________________
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009

Reply via email to