Jump to content
We've recently updated our Privacy Statement, available here ×

ypomonh

Members
  • Posts

    5
  • Joined

  • Last visited

ypomonh's Achievements

Rookie

Rookie (2/14)

  • First Post Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Have a compiled report (eg. "foo.jasper") with parameters and want to get the names of the parameters in order to provide the user with an HTML form to enter them. Is there a way to do it using the API..? :dry: Post edited by: ypomonh, at: 2007/05/20 12:38 Post edited by: ypomonh, at: 2007/05/20 12:39 Post edited by: ypomonh, at: 2007/05/20 12:40
  2. Is it possible to get/set the column width dynamicaly depending on the length of the DB results..?
  3. I have a template that is programmatically generated to display DB records: Code: <band height="30"> <textField> <reportElement x="0" y="0" width="69" height="24"/> <textFieldExpression class="java.lang.String"> <![CDATA[$F{name}]]> </textFieldExpression> </textField> ... </band> Since I don’t know the number of columns beforehand it is a problem to set reportElement/@x. I could decide on some ad hoc numbers for when the # of columns is 2, 3, 4, 5… and set them everytime but this seems ugly. Is there a way to do clever positioning..?
  4. I keep getting: org.xml.sax.SAXParseException: The content of element type "jasperReport" must match "(property*,import*,reportFont*,style*,subDataset*,parameter*,queryString?,field*,variable*,group*,background?,title?,pageHeader?,columnHeader?,detail?,columnFooter?,pageFooter?,lastPageFooter?,summary?)". both using jasperreports-1.2.3.jar & jasperreports-1.3.2.jar. Is there a way to find exactly which element(s) I'm missing for the template to be valid..? This is my minimal template: Code: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="myjr"> <queryString> <![CDATA[select name, chr, sal, street, city from pappat]]> </queryString> <field class="java.lang.String" name="name"/> <field class="java.lang.String" name="chr"/> <field class="java.lang.String" name="sal"/> <field class="java.lang.String" name="street"/> <field class="java.lang.String" name="city"/> <title> <band height="50"> <staticText> <reportElement height="15" width="180" y="0" x="0"/> <textElement/> <text> This is a title </text> </staticText> </band> </title> <pageHeader> <band/> </pageHeader> <columnHeader> <band height="20"> <staticText> <reportElement height="20" width="180" y="0" x="180"/> <textElement> <font isUnderline="true"/> </textElement> <text> <![CDATA[name]]> </text> </staticText> </band> </columnHeader> <columnHeader> <band height="20"> <staticText> <reportElement height="20" width="180" y="0" x="180"/> <textElement> <font isUnderline="true"/> </textElement> <text> <![CDATA[chr]]> </text> </staticText> </band> </columnHeader> <columnHeader> <band height="20"> <staticText> <reportElement height="20" width="180" y="0" x="180"/> <textElement> <font isUnderline="true"/> </textElement> <text> <![CDATA[sal]]> </text> </staticText> </band> </columnHeader> <columnHeader> <band height="20"> <staticText> <reportElement height="20" width="180" y="0" x="180"/> <textElement> <font isUnderline="true"/> </textElement> <text> <![CDATA[street]]> </text> </staticText> </band> </columnHeader> <columnHeader> <band height="20"> <staticText> <reportElement height="20" width="180" y="0" x="180"/> <textElement> <font isUnderline="true"/> </textElement> <text> <![CDATA[city]]> </text> </staticText> </band> </columnHeader> <detail> <band height="20"> <textField> <reportElement height="15" width="180" y="0" x="180"/> <textElement/> <textFieldExpression> <![CDATA[$F{name}]]> </textFieldExpression> </textField> <textField> <reportElement height="15" width="180" y="0" x="180"/> <textElement/> <textFieldExpression> <![CDATA[$F{chr}]]> </textFieldExpression> </textField> <textField> <reportElement height="15" width="180" y="0" x="180"/> <textElement/> <textFieldExpression> <![CDATA[$F{sal}]]> </textFieldExpression> </textField> <textField> <reportElement height="15" width="180" y="0" x="180"/> <textElement/> <textFieldExpression> <![CDATA[$F{street}]]> </textFieldExpression> </textField> <textField> <reportElement height="15" width="180" y="0" x="180"/> <textElement/> <textFieldExpression> <![CDATA[$F{city}]]> </textFieldExpression> </textField> </band> </detail> <columnFooter> <band/> </columnFooter> <pageFooter> <band/> </pageFooter> </jasperReport>
×
×
  • Create New...