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

szaharia

Jaspersoft Staff
  • Posts

    16
  • 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

Posts posted by szaharia

  1. Thank you. The detail band with the Break elements needs to be placed after the band containing the subreport in the JRXML. Something like:

        <detail>        <band height="20" splitType="Stretch">            <subreport isUsingCache="true" runToBottom="true">                ...            </subreport>        </band>        <band height="50">            <break>                 ...            </break>            <staticText>                 ...            </staticText>            <break>                 ...            </break>       </band>    </detail>

     

  2. Hi,

    It depends on your report layout. Usually you could place a Break element before the subreport and this will do the job. Also make sure the net.sf.jasperreports.export.xls.one.page.per.sheet flag is turned on.

    In case these settings don't solve the problem, please post your JRXML files here.

  3. As already discussed above, you'll need to set a currency pattern for the textfield, to be considered in output formats other than Excel (PDF, HTML, etc).

    For the Excel output, you also need to set the net.sf.jasperreports.export.xls.pattern property for that textfield, in order to generate an Excel-specific accounting pattern when exporting to Excel. Try to use the following expression:

    <propertyExpression name="net.sf.jasperreports.export.xls.pattern">    <![CDATA["$\ * #,##0.00;$\ * -#,##0.00"]]></propertyExpression>

     

     

  4. As a workaround you could use the replaceAll() method in the image expression. Something like

    <imageExpression> <![CDATA["http://localhost:8070/webdav/Space In Name.jpg".replaceAll(" ","%20")]]></imageExpression>

    Or, if your image url is stored in a field named image_url:

    <imageExpression><![CDATA[$F{image_url}.replaceAll(" ","%20")]]></imageExpression>

     

  5. Fusion Components are not shipped with JasperReports IO Commercial Edition. In order to process Fusion reports, you'll need to

    • place the jasperreports-fusion.jar file into the jrio/WEB-INF/lib folder
    • include the Fusion components javascript files into the jrio-client application
    • edit the jrio-client/scripts/require.config.js file in order to consider the Fusion components

     

  6. The following workaround should help: for each textfield in the detail section place an empty frame with borders, having the same x, y, width and height as the textfield. Set isPrintWhenDetailOverflows="true" for the frame:

    <frame>    <reportElement stretchType="ContainerHeight" x="150" y="0" width="100" height="30" isPrintWhenDetailOverflows="true"/>    <box>        <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>        <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>        <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>        <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>    </box></frame><textField>    <reportElement stretchType="ContainerHeight" x="150" y="0" width="100" height="30"/>    <box>        <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>        <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>        <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>        <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>    </box>    <textFieldExpression><![CDATA["text content"]]></textFieldExpression></textField>

    Note that the textfield is placed as standalone and not enclosed into the frame.
    Also, the <box> element in the textfield should be kept for getting accurate results when using grid exporters (Excel, ODS, etc).

     

  7. The most recommended way to deal with fonts in JasperReports is to use font extensions. There is a built-in font extension based on DejaVu fonts, so all you need is just to choose the 'DejaVu Sans' font name from the element properties drop down list. The font will be automatically embedded during the PDF export.

    In this case there is no more need of PDF FontName, PDF Embedded and PDF Encoding settings. They should be removed from textfields.

    Also, to get the same text line breaks in PDF as in Java, the following property in the JRXML file will help:

    <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>

  8. In case of JasperServer the time zone value in the login page acts as a default REPORT_TIME_ZONE parameter for all reports in the app. In this situation another property might be useful:

    http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.pattern.timezone

    You'll need to set this property for each report element that depends on a timezone value.

    Also check this post for another possible solution:

    https://community.jaspersoft.com/questions/815702/need-pass-local-browser-timezone-login

  9. Hi, I couldn't reproduce the problem using the JRXML sample. I only noticed that the $F{COLLATERAL} textfield has no stretchType attribute. Try to set the stretchType as "RelativeToTallestObject" like in the other textfields and see if the issue is gone. If the problem persists, please post a screenshot to illustrate where it occurs and for which values. Thank you.

  10. You can set the report timezone dynamically, through JasperReports API:

    Map params = new HashMap<String, Object>();params.put(JRParameter.REPORT_TIME_ZONE, TimeZone.getTimeZone("GMT"));...JasperFillManager.fillReportToFile("my_jasper_file", params, new JREmptyDataSource())

    Another possibility would be to use this property in the JRXML file:

    <property name="net.sf.jasperreports.default.timezone" value="GMT"/>

    See http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.default.timezone

×
×
  • Create New...