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

andre2k2

Members
  • Posts

    17
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by andre2k2

  1. Now i'am using this renderer: Code: public class BarbecueRenderer extends JRAbstractSvgRenderer { /** * */ private Barcode barcode = null; private static final int DEFAULT_BAR_WIDTH = 1; private static final int DEFAULT_BAR_HEIGHT = 37; public BarbecueRenderer(Barcode barcode) { this.barcode = barcode; this.barcode.setBarWidth(DEFAULT_BAR_WIDTH); this.barcode.setBarHeight(DEFAULT_BAR_HEIGHT); this.barcode.setDrawingText(false); } public void render(Graphics2D g2d, Rectangle2D rect2d) throws JRException { if (barcode == null) { return; } double scaleX; double scaleY; Rectangle r = this.barcode.getBounds(); scaleX = rect2d.getWidth() / r.getWidth(); scaleY = rect2d.getHeight() / r.getHeight(); try { AffineTransform oldTF = g2d.getTransform(); AffineTransform scaler = AffineTransform.getScaleInstance(scaleX, scaleY); g2d.transform(scaler); this.barcode.draw(g2d, (int) (rect2d.getX() / scaleX), (int) (rect2d.getY() / scaleY)); g2d.setTransform(oldTF); } catch(OutputException e) { throw new JRException(e); } } public Dimension2D getDimension() { return this.barcode.getBounds().getSize(); } } Into my xml I this is the code: Code:[code] <image hAlign="Center" scaleImage="RetainShape"> <reportElement height="36" positionType="Float" width="291" x="31" y="101"/> <graphicElement/> <imageExpression class="net.sf.jasperreports.engine.JRRenderable"> <![CDATA[new br.com.datamanager.geradorrelatorio.renderers.BarbecueRenderer( net.sourceforge.barbecue.BarcodeFactory.createInt2of5($P{CODIGO_BARRAS}) )]]> </imageExpression> </image> Well... now when the application call JasperViewer first time barcode is rigth, but if i resize the window then barcode resizes.. and reduce, reduce... then it disappear... :blink: Someone can help me? What is happen? Post edited by: andre2k2, at: 2007/08/10 17:31
  2. hello... I am using barbecue library to generate barcodes into my reports... I set bar width to minimum size (1 pixel)... but the result is to large yet... how can i resize and reduce more?
  3. There is any way to do jasper do not write "null" when the query field is null?
  4. I have an application that needs to especify what printer the reports will be print... But JasperReports just print showing the PrintDialog, or printing with default printer... There are any way to print with a printer that application chooses?
  5. The problem happens when call compileReportToFile()
  6. Im with problems passing an image (java.awt.Image) in my JRXML the code is: Code: <image hAlign="Center" scaleImage="RetainShape" vAlign="Middle"> <reportElement height="80" width="149" x="10" y="0"/> <graphicElement stretchType="RelativeToTallestObject"/> <imageExpression class="java.awt.Image"><![CDATA[$P{Logomarca}]]></imageExpression> </image> then in java i do: Code:[code] Map<String, Object> parametros = new HashMap<String, Object>(); parametros.put("Logomarca", logomarca); but this error message is show: Report design not valid : 1. Parameter not found : Logomarca ???????????????
  7. Im with problems passing an image (java.awt.Image) in my JRXML the code is: Code: <image hAlign="Center" scaleImage="RetainShape" vAlign="Middle"> <reportElement height="80" width="149" x="10" y="0"/> <graphicElement stretchType="RelativeToTallestObject"/> <imageExpression class="java.awt.Image"><![CDATA[$P{Logomarca}]]></imageExpression> </image> then in java i do: Code:[code] Map<String, Object> parametros = new HashMap<String, Object>(); parametros.put("Logomarca", logomarca); but this error message is show: Report design not valid : 1. Parameter not found : Logomarca ??????????????? Post edited by: andre2k2, at: 2007/06/28 13:45
  8. Im using Barbecue to create barcodes... i saw in the sample this code: Code:<imageExpression class="net.sf.jasperreports.engine.JRRenderable"> new net.sf.jasperreports.renderers.BarbecueRenderer(BarcodeFactory.createCode128B("1234567890"«»)) </imageExpression> But when i try to find the class "BarbecueRenderer" it not exists :blink: I downloaded the barbecue .jar and included in my classpath... Then where is BarbecueRenderer??? Post edited by: andre2k2, at: 2007/06/27 14:18
  9. Nobody knows? Did you understand my question?
  10. i solved the problem... the printOrder attribute was wrong... then i changed to vertical and works fine!!! Thank you all, guys!!
  11. I'd like to know if jasper print manager offers any support to print reports with matrix printers... i know it prints, i did some testes, but the printer prints as an image... its to slow... there is a way to send those hard codes to printers to print as text?
  12. Nick wrote: Try setting a query in your master report. Then the subreport will be generated the same number of rows in the query result set. Also, try changing the some settings in the tutorial subreport sample. Hope this helps. I did it... but nothing happens :( The problem persists!!!
  13. I saw the subreport sample (http://www.jasperforge.org/images/documentation/jasperreports/samples/MasterReport.pdf) of the tutorial is exactly what i want to do... but i do not undertand how is the diference... why example code works... and why my code do not???
  14. arunvishvin wrote: Is the second part of the report the subreport or the whole code is the second report. The second part is the report... and the first is the subreport...
  15. But if i put into summary i will lost pageheader and pagefooter session! I cannot lose it :( No any way to do it?
  16. Guys, i am in throuble... I am trying to compile this JRXML: Code: <?xml version="1.0" encoding="iso-8859-1"?> <jasperReport bottomMargin="0" columnCount="1" columnWidth="540" isSummaryNewPage="false" isTitleNewPage="false" leftMargin="0" name="cv_subreport_0" pageHeight="168" pageWidth="540" printOrder="Horizontal" rightMargin="0" topMargin="0"> <queryString><![CDATA[select t.cart_sequencial, t.cart_descricao, t.cart_codg_convenio from cartoes t order by t.cart_codg_convenio, t.cart_sequencial]]></queryString> <field class="java.lang.String" name="CART_CODG_CONVENIO"/> <field class="java.lang.String" name="CART_DESCRICAO"/> <field class="java.lang.Integer" name="CART_SEQUENCIAL"/> <group name="CART_CODG_CONVENIO_GROUP"> <groupExpression><![CDATA[$F{CART_CODG_CONVENIO}]]></groupExpression> <groupHeader> <band height="20" isSplitAllowed="true"> <textField> <reportElement forecolor="#000000" height="19" mode="Transparent" width="532" x="0" y="1"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" isBold="true" isItalic="false" isUnderline="false" pdfFontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["CONVÊNIO: "+$F{CART_CODG_CONVENIO}]]></textFieldExpression> </textField> </band> </groupHeader> </group> <columnHeader> <band height="30" isSplitAllowed="true"/> </columnHeader> <detail> <band height="16" isSplitAllowed="true"> <textField> <reportElement forecolor="#000000" height="16" mode="Transparent" width="384" x="140" y="0"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" isBold="false" isItalic="false" isUnderline="false" pdfFontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{CART_DESCRICAO}]]></textFieldExpression> </textField> <textField> <reportElement forecolor="#000000" height="16" mode="Transparent" width="156" x="0" y="0"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" isBold="true" isItalic="false" isUnderline="false" pdfFontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{CART_SEQUENCIAL}]]></textFieldExpression> </textField> </band> </detail> </jasperReport> ===================================================== <?xml version="1.0" encoding="iso-8859-1"?> <jasperReport bottomMargin="0" columnCount="1" columnWidth="595" isSummaryNewPage="false" isTitleNewPage="false" leftMargin="0" name="cv" pageHeight="850" pageWidth="595" printOrder="Horizontal" rightMargin="0" topMargin="0"> <pageHeader> <band height="90" isSplitAllowed="true"/> </pageHeader> <detail> <band height="168" isSplitAllowed="true"> <subreport> <reportElement height="168" width="540" x="28" y="0"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA["cv_subreport_0.jasper"]]></subreportExpression> </subreport> </band> </detail> <pageFooter> <band height="60" isSplitAllowed="true"/> </pageFooter> </jasperReport> Note this is a subreport inside a report... well... the problem is... when i compile this exception is throwing: Code:[code]30/05/2007 14:06:50 net.sf.jasperreports.engine.fill.JRFillSubreport prepare SEVERE: Fill 2950275: exception net.sf.jasperreports.engine.JRRuntimeException: Subreport overflowed on a band that does not support overflow. How can i fix it? thanxs!!! :D
×
×
  • Create New...