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

sanbez

Members
  • Posts

    296
  • 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 sanbez

  1. Step by step.

    Try delete subreport 2 from main report and run main report again. Will the error appear again in this case?

    It is very strangely use $F{fieldName} at band Last Page Footer. It seems all fields equals null in this band. So expression $F{SHeft}.equals(Boolean.TRUE.toString()) can generate NPE.
    Use "Yoda condition" to avoid such NPE. For instance change expression to (Boolean.TRUE.toString()).equals( $F{SHeft})

    HTH

     

  2. Usially subreport expression like this:

    $P(SUBREPORT_DIR)+"mySubreportName.jasper" 

    You pass $P{subreportParameter}  from main report as parameter of subreport (which? it seems it not defined yet). It is very unclear (imho).
    And what the reason use dynamic subreport name?
    For exaple myFirstReport.jrxml include executing subreport1.jassper
    and mySecondReport.jrxml include executing subreport2 and may be subreport3.jasper

    I can't see the reason use dynamic executing subreport1 in mySecondReport.jrxml

    Sorry for chaotic answer... but question is chaotic too )))

    Try use static subreport name in mainReport.jrxml

    One useful link:
    https://stackoverflow.com/questions/18656016/jasperreports-cant-locate-subreport
     

  3. In my reports alignment works well
    Try to ask correct question

    From SO:
    "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers

  4. 1. Are you sure that $F{cnt_benennung}.intValue()   count a "zeile" but not "benennung" ?
    2. Positions for Row 2 and Row 4  equals 2 but not 4  imho
    3. It is not clear for me how you can "find"  Row 1 and Row 2  with condition   =  zeile[position>4]

    Question unclear.

  5. Hi, All

    Conditional style don't work when report element contain backcolor attribute.
    Little duscussion here https://community.jaspersoft.com/questions/1042866/background-color-conditional-style-doesnt-drawn

    I can't find method delete backcolor attribute in report element from JasperStudio 6.4.0 using only UI
    When I delete it from bookmark "Source" then Studio can't show report in Design mode.
    After closing and reopening report Studio work fine.
    I have many fields in report so it is not so pleasure to close and reopen report after any changes.

    How I can delete backcolor from Studio UI ?

    Part of jrxml

        <style name="temperatureInput" pattern="###0.00" fontSize="12">
            <box>
                <pen lineWidth="0.5"/>
                <topPen lineWidth="0.5"/>
                <leftPen lineWidth="0.5"/>
                <bottomPen lineWidth="0.5"/>
                <rightPen lineWidth="0.5"/>
            </box>
            <conditionalStyle>
                <conditionExpression><![CDATA[$F{temperature_input}.getHole() == 0]]></conditionExpression>
                <style mode="Transparent" forecolor="#000000" isBlankWhenNull="false"/>
            </conditionalStyle>
            <conditionalStyle>
                <conditionExpression><![CDATA[$F{temperature_input}.getHole() != 0]]></conditionExpression>
                <style mode="Opaque" forecolor="#000000" backcolor="#FFFF00" isBlankWhenNull="false"/>
            </conditionalStyle>
        </style>
    ...

                                <jr:detailCell height="20">
                                    <textField pattern="" isBlankWhenNull="true">
                                        <reportElement style="temperatureInput" mode="Opaque" x="0" y="0" width="60" height="20" backcolor="#FFFFFF" uuid="ee2ee2fe-032c-4b60-8fc1-807e9a9500e7"/>
                                        <box>
                                            <pen lineWidth="0.5"/>
                                            <topPen lineWidth="0.5"/>
                                            <leftPen lineWidth="0.5"/>
                                            <bottomPen lineWidth="0.5"/>
                                            <rightPen lineWidth="0.5"/>
                                        </box>
                                        <textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
                                            <font fontName="DejaVu Sans" size="12"/>
                                        </textElement>
                                        <textFieldExpression><![CDATA[$F{temperature_input}.getValue()]]></textFieldExpression>
                                    </textField>
                                </jr:detailCell>

     

  6. >> I found a solution for this. If the Input Parameter is java.util.Date type the hours are not taken into consideration in query
    >> I changed the Input Parameter type to java.sql.Timestamp and now hours are taken into consideration.
    It is not solution. You have to check your java code
    I make test report and it work fine with java.util.Date. My test report shows parameters in title of report with hours !=0. And it uses hours in query correctly

    You have a chance get unexpected errors because your solution hide potentional errors (types casting?, parsing?, ...?)
    I hope you will find a time to solve this problem in right way.
    Good luck

  7. Java code looks correct. I cant't see value $P{DateFromInputControl}

    may by your code like this?
    fillParams.put("DateFromInputControl", dateFrom);
    fillParams.put("DateToInputControl", dateFrom);

    Show declaration ( and new () ) for map fillParams and how you put values into this map in java code.
    Why parameter names starting from upper letter?

×
×
  • Create New...