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

Ajenjo

Members
  • Posts

    30
  • Joined

  • Last visited

Ajenjo's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi. The solution is the report property columnCount. In this case: columnCount="2". (By default, the reporting engine creates report with one column on each page.) JasperReports allows creating reports with more than one column on each page, like in the following picture, where we can see the layout of a report with two columns.
  2. Perfect !!!!! That's the solution. Thanks so much again.
  3. Thanks for your reply mennei. I'll create my report with these two columns and told you the result. Cheers
  4. Ok, I read in Strech sample the next: When filling report templates horizontally, dynamic text fields inside the detail section do not stretch to their entire text content, because this might cause misalignment on the horizontal axis of subsequent detail sections. The detail band actually behaves the same as the page and column footers, preserving its declared height when horizontal filling is used. Are some form to print in two columns with large fields in detail section ???????? Thanks.
  5. Hi. I need your help. I have to create a report of general conditions with two columns for page, like page 2 in http://ec.europa.eu/europeaid/work/framework-contract/enpi/documents/3_2_general_conditions_en.pdf I see the HorizontalReport example, but in my case some text has a bold, italic or underline style... I'm thinking create a report with printOrder="Horizontal" with one line in detail section (for example with the filed 'text') with a 50% of page width and use differents <textField> for each styles: <textField> <reportElement x="40" y="2" width="130" height="11"> <printWhenExpression><![CDATA[new Boolean($F{style}.intValue() == 0)]]></printWhenExpression> </reportElement> <textElement/> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{text}]]></textFieldExpression> </textField> <textField> <reportElement x="40" y="2" width="130" height="11" style="Arial_Bold"> <printWhenExpression><![CDATA[new Boolean($F{OrderID}.intValue() == 1)]]></printWhenExpression> </reportElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{text}]]></textFieldExpression> </textField> (...) What you say??? Thanks Post Edited by Ajenjo at 01/26/2012 15:20 Post Edited by Ajenjo at 01/26/2012 15:25 Post Edited by Ajenjo at 01/26/2012 15:27
  6. Cheers. I've a styled textFileld in my report; the size, forecolor, etc... tags works fine but no isBold (when export file to PDF). Why ??? $text = <style size="11" forecolor="#747678">Text text text text</style><style isItalic="true" size="11">italic text</style><style size="11" forecolor="#747678">text text </style><style isBold="true" size="20" forecolor="#CCFF33">bold text </style><style size="11" forecolor="#747678">text text</style><style isBold="true" size="11" forecolor="#747678"> text text text </style><style size="11" forecolor="#747678">text text text text text </style><style isBold="true" isUnderline="true" size="11" forecolor="#747678">bold underline text</style><style size="11" forecolor="#747678"> tex tex text text text</style> <style size="11" forecolor="#747678">Text </style><style isBold="true" size="11" forecolor="#747678">bold text</style><style size="11" forecolor="#747678"> text</style> (...) <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToBandHeight" x="2" y="1" width="551" height="14" isPrintWhenDetailOverflows="true"> <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/> <property name="net.sf.jasperreports.print.keep.full.text" value="true"/> </reportElement> <textElement textAlignment="Justified" markup="styled"> <font fontName="Tahoma" size="16" isPdfEmbedded="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{text}]]></textFieldExpression> </textField> (...) Can you help me ? Thanks. Jasperreport 4.0.1
  7. Hi. I have a subreport with 3 columns. Depending on the user's action is hidden some of the columns. My question is, how I can be able to hide or show columns in runtime for these reports? I do it with this code: File sourceFile = new File(rootJasperFiles + "RequestProposal_Products.jasper"); JasperReport sourceJasperReport = (JasperReport)JRLoader.loadObject(sourceFile); JRStaticText unitsLabelBox = (JRStaticText)sourceJasperReport.getColumnHeader().getElementByKey("unitslabel.box"); unitsLabelBox.setWidth(0); JRTextField unitsLabelTextField = (JRTextField)sourceJasperReport.getColumnHeader().getElementByKey("unitslabel.textfield"); unitsLabelTextField.setWidth(0); JRBand[] jrbands = (JRBand[])sourceJasperReport.getDetailSection().getBands(); JRFrame unitsFrame = (JRFrame)jrbands[0].getElementByKey("units.frame"); unitsFrame.setWidth(0); JRTextField unitsTextField = (JRTextField)jrbands[0].getElementByKey("units.textfield"); unitsTextField.setWidth(0); jasperPrint = JasperFillManager.fillReport(rootJasperFiles + "RequestProposal.jasper", pars, dataSource); But no works, I think that the subreport has the changes but I fill the "parent" report with no changes ¿?¿?¿? Can you help me, thanks.
  8. I have a problem with Jasper Reports & Weblogic. My deploy on Tomcat works fine, but in Weblogic show the next exception: net.sf.jasperreports.engine.JRException: Error loading expression class : .. Caused by: java.lang.ClassCastException: MYREPORT_1290416522329_455758 cannot be cast to net.sf.jasperreports.engine.fill.JREvaluator at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.loadEvaluator(JRAbstractJavaC .. Weblogic 10.3.3.0 Jasper Reports 4.0.1 Can you help me? Thanks.... Post Edited by Ajenjo at 05/30/2011 08:13
  9. Hi. (iReport 3.5.3) I was reading this topic but I haven't gotten it to work. When I create the JAR with ttf, jasperreports_extension.properties, and the file with fonts (font.xml) I don´t know where put it in my system (C:\Program Files\Jaspersoft\iReport-nb-3.5.3\ireport\modules\ext\ ??????). I've tried "everything". In my jrxml: (...) <band height="16" splitType="Stretch"> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement stretchType="RelativeToBandHeight" x="2" y="0" width="551" height="14" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Justified" markup="html"> <font fontName="arial"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{text}]]></textFieldExpression> </textField> </band> (...) In font.xml: <?xml version="1.0" encoding="UTF-8"?> <fontFamilies> <fontFamily name="Arial"> <normal><![CDATA[arial.ttf]]></normal> <bold><![CDATA[arialbd.ttf]]></bold> <italic><![CDATA[ariali.ttf]]></italic> <boldItalic><![CDATA[arialbi.ttf]]></boldItalic> <pdfEmbedded><![CDATA[true]]></pdfEmbedded> </fontFamily> <fontFamily name="Tahoma"> <normal><![CDATA[fonts/tahoma.ttf]]></normal> <bold><![CDATA[fonts/tahomabd.ttf]]></bold> <pdfEmbedded><![CDATA[true]]></pdfEmbedded> </fontFamily> </fontFamilies> In jasperreports_extension.properties: net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory net.sf.jasperreports.extension.simple.font.families.myfamily=fonts.xml Please somebody to help me step by step (I am very clumsy...). Thanks.
  10. I see this and I want do it. [file name=Horizontal_filling.zip size=21214] Post edited by: Ajenjo, at: 2008/06/16 08:52
  11. There is (in the example) 5 columns, but the report fill the detail section in the same mode as Vertical. You told me about "horizontal" sample in the JasperReports distribution. Can you tell me where is this??? Thanks. Post edited by: Ajenjo, at: 2008/06/16 08:51
  12. Hi. I need print with Horizontal Filling, but I can´t do it work correctly. Example: Code: Is this option implementted? Thanks.
  13. I tried to put a style element ( <style name="estilo" hAlign="Right"/> ) Code: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD JasperReport//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="albaran" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20"> <style name="estilo" hAlign="Right"/> <property name="ireport.scriptlethandling" value="2"/> (...) to use it in reportElement Code:[code] (...) <reportElement stretchType="RelativeToBandHeight" style="estilo" x="450" y="0" width="82" height="15" backcolor="#CCCCCC"/> (...) but show me the error : net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: The content of element type "jasperReport" must match "(property*,import*,template*,reportFont*,style*,subDataset*,parameter*,queryString?,field*,sortField*,variable*,filterExpression?,group*,background?,title?,pageHeader?,columnHeader?,detail?,columnFooter?,pageFooter?,lastPageFooter?,summary?,noData?)". at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.loadJasperDesign(IReportCompiler.java:1775) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:503) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Caused by: org.xml.sax.SAXParseException: The content of element type "jasperReport" must match "(property*,import*,template*,reportFont*,style*,subDataset*,parameter*,queryString?,field*,sortField*,variable*,filterExpression?,group*,background?,title?,pageHeader?,columnHeader?,detail?,columnFooter?,pageFooter?,lastPageFooter?,summary?,noData?)". at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) Any help? Post edited by: Ajenjo, at: 2008/04/24 09:51 Post edited by: Ajenjo, at: 2008/04/24 09:57 Post edited by: Ajenjo, at: 2008/04/24 09:59
  14. Hi. I have to show a number right aligned. But it not do it, it appears in the left. The code: Code: (...) <textField isStretchWithOverflow="true" pattern="#,##0.00" hyperlinkType="None"> <reportElement stretchType="RelativeToBandHeight" x="450" y="0" width="82" height="15" backcolor="#CCCCCC"/> <textElement textAlignment="Right" verticalAlignment="Bottom"> <font isStrikeThrough="false"/> </textElement> <textFieldExpression class="java.lang.Float"><![CDATA[$F{importe}]]></textFieldExpression> </textField> (...) I write it as a String but have the same result. Any idea? Thanks
  15. Post edited by: Ajenjo, at: 2008/03/27 08:44
×
×
  • Create New...