Jump to content
Changes to the Jaspersoft community edition download ×

asejas

Members
  • Posts

    37
  • 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 asejas

  1. I would use scriptlets: https://community.jaspersoft.com/blog/all-you-want-know-about-scriptlets
  2. Have you tried to pass the information as a parameter to the subreport? https://stackoverflow.com/questions/13843167/passing-parameters-from-main-report-to-subreport-in-jasper
  3. I has installed the And plug-in in iReport,, I can add/edit the ant tasks xml, but I don't know how to run the tasks from iReport. Can someone explain how to execute the targets please? Post Edited by asejas at 12/28/2011 21:18
  4. And the xsd in this location: http://jasperreports.sourceforge.net/xsd/jasperreport.xsd Don´t contains the patternExpression element.
  5. I am using this header: <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
  6. This may be a problem with the xsd, in IntelliJ Idea, the xsd used don´t contains the <patternExpression>, I had added it manually and it works. This should be an obsolete xsd problem Post Edited by asejas at 12/22/2011 13:54
  7. You need to add the not supported font as a jasperreports font extension. See the fonts sample and try to generate your own jasperreports-fonts extension jar with the needed font as ttf embedded.
  8. Or you can use two textFields (one with "YES" text and another with "NO") with "showWhenExpression" selection.
  9. I think you should use scripting in the parameter default value expression. e.g.: new java.util.Date("01-01-1970"); Post Edited by asejas at 12/22/2011 13:21
  10. I think, this should be a problem with the extension fonts jar. Perhaps the locales section in the fontFamily Sample: <locales> <locale>en_US</locale> <locale>de_DE</locale> </locales> See this: http://www.jaspersoft.com/sites/default/files/jw-presentations/JW11_JasperReports_Tips_And_Tricks_TeodorDanciu%2002.pdf
  11. I think, you should pass the properties file path as a report parameter (add a parameter to the template), and load the path in the scriptlet with: this.this.getParameterValue("propertiesFilePath");
  12. I was reviewing the changes log, and I see the JasperReports 4.1.1 Change Log: - pattern expression added to text fields elements to allow for more flexible dates and numbers formatting; But I notice that no one tag or property "patternExpression" was added to the template xsd, the "patternExpression" field was only added in the JasperReports API. So, ¿can I use the patternExpression through the API only? Regards. Alvaro
  13. Can you post a piece of your report template in order to explain your problem? I think you can be missing the pattern for the date. Code:<textField isBlankWhenNull="true" isStretchWithOverflow="true" pattern="dd/MM/yyyy"> <reportElement x="400" y="0" width="150" height="12" style="detailStyle" stretchType="RelativeToTallestObject" mode="Opaque"/> <box padding="1"> <pen lineColor="#000000" lineStyle="Solid"/> </box> <textElement textAlignment="Left"/> <textFieldExpression class="java.util.Date"> <![CDATA[$F{purchaseDate}]]></textFieldExpression> </textField>
  14. Hi, I have a textBox in order to show the page number (e.g. 1 / 10 pages). In this textBox I show the PAGE_NUMBER variable, with a "Report" time evaluation. But when I add a box for the field padding, then the number is not rendered at all, but if I remove the box tag or I remove the evaluationTime, then the number is rendered in the report. I am using JasperReports3.7.0 in a JEE web application. Code: Post Edited by asejas at 05/19/2010 13:33
  15. I remember that spring-beans (and spring-core if required).
  16. For the text, you should use java resource bundle and setting the REPORT_LOCALE dinamically (when you ran the report). You can see the "Internacionalization" section in the jasper reports tutorial http://jasperforge.org/website/jasperreportswebsite/trunk/tutorial.html For numbers formatting, you should use patterns int he textFields. Regards. Alvaro
  17. All the content you put in a band is a line, regardless of its "y" position, i.e. If you put three elements in the detail band: A: x=0, y=0 B: x=20, y=0 C: x=50, y=20 The three elements are a line in the report, the "C" element is not another line. If you want to have more control over the layout, you can put the elements in frames (see frame element documentation), If you put the Journal element in a frame, then it will not stretch when another element outside the frame overflows. Post Edited by asejas at 02/09/2010 20:32 Post Edited by asejas at 02/09/2010 20:32
  18. I add the permissions to the two files but not working yet. Then I click in JasperETL-All-r12707-V2.3.2/JasperETL-macosx-carbon.app/Contents/MacOS/JasperETL-macosx-carbon and works!
  19. I have a variable when I store the value of the records processed in a subreport. The subreport is into a group header, and I need to get the value of the variable in the same group header, I try to evaluate the variable value with evaluationTime="Group" but I only gets an empty textfield. Is feasible to get the value of the variable in the group header? or should I move the textfield to another band? (In the code, the problem is with the 'pollPersonCountVar' variable). Code:...<variable name="pollPersonCountVar" class="java.lang.Integer" calculation="System"/>...<group name="teacherGroup"> <groupExpression><![CDATA[$F{personId}]]></groupExpression> <groupHeader> <band height="114"> <subreport isUsingCache="true"> <reportElement key="subreportpollByPersonSubReport" positionType="Float" x="0" y="0" width="562" height="54"/> <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression> <subreportParameter name="personIdParam"> <subreportParameterExpression><![CDATA[$F{personId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="JPA_ENTITY_MANAGER"> <subreportParameterExpression><![CDATA[$P{JPA_ENTITY_MANAGER}]]></subreportParameterExpression> </subreportParameter> <returnValue subreportVariable="personGroup_COUNT" toVariable="pollPersonCountVar"/> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"> <![CDATA[$P{pollByPersonHeaderSubReport}]]></subreportExpression> </subreport> ..... <textField isStretchWithOverflow="true" evaluationTime="Group" evaluationGroup="teacherGroup" isBlankWhenNull="true"> <reportElement style="detailStyle" positionType="Float" mode="Opaque" x="450" y="30" width="112" height="12"/> <box padding="1"> <pen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Right"/> <textFieldExpression class="java.lang.Integer"> <![CDATA[$V{pollPersonCountVar}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter>.....
  20. I think you forgot to set the 'stretchType' and 'positionType' properties. See sample code. Code:<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="headerStyle" positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="256" height="12"/> <box padding="1"> <pen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Left"/> <textFieldExpression class="java.lang.String"> <![CDATA[$R{SomeResource}]]></textFieldExpression></textField>
  21. I think, when you use more than one object as result of a query, you need some like this: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=69898
  22. You can see the datasource sample in the demo directory of the JasperReports projects. Also, I am using JR with JPA queries, some queries return an objects List, then I add the fields to the reports using a prefix and a column number, the number is the position of the field in the JPA Query (see sample code). "COLUMN_1" maps to "someEntity.person.id" in the JPA Query, and has an alias: "person.id" "COLUMN_2" maps to "someEntity.person.name" in the JPA Query, and has an alias: "person.name" Hope this helps you. Code:QuerySELECT DISTINCT someEntity.person.id, someEntity.person.name, someEntity.person.name2 ....Fields <field name="person.id" class="java.lang.Long"> <fieldDescription><![CDATA[COLUMN_1]]></fieldDescription> </field> <field name="person.name" class="java.lang.String"> <fieldDescription><![CDATA[COLUMN_2]]></fieldDescription> </field> <field name="person.lastName" class="java.lang.String"> <fieldDescription><![CDATA[COLUMN_3]]></fieldDescription> </field>
  23. IReport 3.6.2 for design. But I am setting some properties in an exporter helper class (for some reason that I don't remember now). Should I remove this properties? Code:exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE);exporter.setParameter(JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE,Boolean.FALSE); Post Edited by asejas at 01/20/2010 16:17
  24. This post could help: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=68624
×
×
  • Create New...