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

nhutnhut79

Members
  • Posts

    24
  • 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 nhutnhut79

  1.     Hi,

        I have a problem with library of jasperreports.

        I designed a report from Jaspersoft Studio 5.5.2 final: Headers, Static Text with Font: Arial and Bold.

        When i view from Jaspersoft Studio 5.5.2 final is OK. but when call from code  the Font size and Bold not active. I used library (jasperreports-fonts-5.6.1.jar). Please, see picture below:

        Bucminh.bmp

        Can you help me?!

        Nhut Le

     

  2. Hi,

    Today, i have deasign a calendar report. With a field from sql have muti line. I don't  succeed with LINE. 

    If details on a page, result will Ok.

    If details on two page, result will lose lines on page 2(se Figure below).

    NoLine.png.06ab0a234248e604365d8b6d6a3b800c.png

    I try change propertys for its but result don't true. Please help me to fix this bug.

    Thanks you very much!

    Nhut Le

  3. <?xml version="1.0" encoding="UTF-8"?>
    <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" name="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="89f86b24-87cf-4ad5-b343-ae1c7c0f2eb6">
        <property name="ireport.zoom" value="1.0"/>
        <property name="ireport.x" value="0"/>
        <property name="ireport.y" value="0"/>
        <queryString>
            <![CDATA[select * from dataset]]>
        </queryString>
        <field name="Name" class="java.lang.String"/>
        <field name="Date" class="java.sql.Timestamp"/>
        <field name="NumCoffees" class="java.math.BigDecimal"/>
        <field name="NumDonuts" class="java.lang.String"/>
        <group name="Name">
            <groupExpression><![CDATA[$F{Name}]]></groupExpression>
            <groupHeader>
                <band height="86">
                    <textField>
                        <reportElement uuid="2b020496-555e-4f88-92df-fb1d3f3c5fab" x="55" y="46" width="427" height="20"/>
                        <box>
                            <topPen lineWidth="1.0"/>
                            <leftPen lineWidth="1.0"/>
                            <rightPen lineWidth="1.0"/>
                        </box>
                        <textElement textAlignment="Center">
                            <font size="12" isBold="true"/>
                        </textElement>
                        <textFieldExpression><![CDATA[$F{Name}]]></textFieldExpression>
                    </textField>
                    <staticText>
                        <reportElement uuid="a92aedb4-490a-4d4f-8792-92a7be0893d2" x="55" y="66" width="169" height="20"/>
                        <box>
                            <topPen lineWidth="1.0"/>
                            <leftPen lineWidth="1.0"/>
                            <rightPen lineWidth="1.0"/>
                        </box>
                        <textElement/>
                        <text><![CDATA[Date]]></text>
                    </staticText>
                    <staticText>
                        <reportElement uuid="b1ed9ea2-2564-4073-9f1f-a98f4056f2e3" x="224" y="66" width="138" height="20"/>
                        <box>
                            <topPen lineWidth="1.0"/>
                        </box>
                        <textElement/>
                        <text><![CDATA[Num of Coffees]]></text>
                    </staticText>
                    <staticText>
                        <reportElement uuid="107c9050-d08d-4f14-aa1a-76af89cb5409" x="362" y="66" width="120" height="20"/>
                        <box>
                            <topPen lineWidth="1.0"/>
                            <leftPen lineWidth="1.0"/>
                            <rightPen lineWidth="1.0"/>
                        </box>
                        <textElement/>
                        <text><![CDATA[Num of Donuts]]></text>
                    </staticText>
                </band>
            </groupHeader>
            <groupFooter>
                <band/>
            </groupFooter>
        </group>
        <background>
            <band splitType="Stretch"/>
        </background>
        <title>
            <band splitType="Stretch"/>
        </title>
        <pageHeader>
            <band splitType="Stretch"/>
        </pageHeader>
        <columnHeader>
            <band splitType="Stretch"/>
        </columnHeader>
        <detail>
            <band height="20" splitType="Stretch">
                <textField>
                    <reportElement uuid="9d952323-4106-4f8a-b793-0700c561d520" x="362" y="0" width="120" height="20"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textElement/>
                    <textFieldExpression><![CDATA[$F{NumDonuts}]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement uuid="2459e8fe-648b-4582-91fb-785e80e7d2ae" x="224" y="0" width="138" height="20"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                    </box>
                    <textElement/>
                    <textFieldExpression><![CDATA[$F{NumCoffees}]]></textFieldExpression>
                </textField>
                <textField pattern="dd-MMM">
                    <reportElement uuid="28965c6d-7a6d-468d-82e8-84bde99873e9" x="55" y="0" width="169" height="20"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textElement/>
                    <textFieldExpression><![CDATA[$F{Date}]]></textFieldExpression>
                </textField>
            </band>
        </detail>
        <columnFooter>
            <band splitType="Stretch"/>
        </columnFooter>
        <pageFooter>
            <band splitType="Stretch"/>
        </pageFooter>
        <summary>
            <band splitType="Stretch"/>
        </summary>
    </jasperReport>
     

  4. Hello everyone,

    SANBEZ had helped  me,  try to use BigDecimal.setScale instead Math.round:  http://community.jaspersoft.com/questions/820117/mathround-two-decimal-ireport-v50.

    Result is fine but with data have many record is result fine yet. I think problem at round funtion in Ireprot.  I have an example with 20 record.

     

    Ireport_and_Crystal.jpg.43a6bd177946928ce30ac816f7f5fe66.jpg

    My job current is convert  formulars from Crystal report to Ireport Jasper. I have many difficulties with Round function because result on report  don't same with old report.

    We don't use Pattern property  for this case. I want Math.round(), setScale() return: 20.05 not 20.049999999999997.

     

    Please help me!

     

×
×
  • Create New...