Jump to content
Changes to the Jaspersoft community edition download ×

Trouble with printWhenExpression


2005 IR Help

Recommended Posts

By: Malte Kempff - takidoso

Trouble with printWhenExpression

2004-11-09 05:10

Hi to all,

refering on my entry before

I changed the generated stuff from iReport mannually

to

...

<staticText>

<reportElement

mode="Opaque"

x="49"

y="62"

width="70"

height="15"

forecolor="#000000"

backcolor="#FFFFFF"

key="staticText-5"

stretchType="NoStretch"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="true"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false">

<printWhenExpression>new Boolean($F{VERBRAUCHSDATUM}!=null)</printWhenExpression>

</reportElement>

 

 

and still got the Error while runtime:

NESTED BY :

 

net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : printWhen_2

Source text : new Boolean ($F{SERIENNR}!=null)

 

at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:427)

 

at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:356)

 

at net.sf.jasperreports.engine.fill.JRFillElement.evaluatePrintWhenExpression(JRFillElement.java:606)

 

at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:318)

 

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:383)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1319)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:654)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:278)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:186)

 

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)

 

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:160)

 

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:353)

 

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:340)

 

at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:868)

 

at de.mc.etnbestterm.gui.BestellungsBestaetigungsPanel.setReportData(BestellungsBestaetigungsPanel.java:148)

 

at de.mc.etnbestterm.gui.StatusPanel.jTabbedPane1_stateChanged(StatusPanel.java:548)

 

at de.mc.etnbestterm.gui.StatusPanel.access$200(StatusPanel.java:33)

 

at de.mc.etnbestterm.gui.StatusPanel$3.stateChanged(StatusPanel.java:202)

 

at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:287)

 

at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:219)

 

at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)

 

at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)

 

at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:468)

 

at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:461)

 

at javax.swing.plaf.basic.BasicTabbedPaneUI$MouseHandler.mousePressed(BasicTabbedPaneUI.java:3060)

 

at java.awt.Component.processMouseEvent(Component.java:5097)

 

at java.awt.Component.processEvent(Component.java:4897)

 

at java.awt.Container.processEvent(Container.java:1569)

 

at java.awt.Component.dispatchEventImpl(Component.java:3615)

 

at java.awt.Container.dispatchEventImpl(Container.java:1627)

 

at java.awt.Component.dispatchEvent(Component.java:3477)

 

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

 

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195)

 

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

 

at java.awt.Container.dispatchEventImpl(Container.java:1613)

 

at java.awt.Window.dispatchEventImpl(Window.java:1606)

 

at java.awt.Component.dispatchEvent(Component.java:3477)

 

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

 

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

 

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

 

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

 

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

 

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

 

Caused by: java.lang.ClassCastException

 

at AnforderungsBestaetigungsHBReport.evaluate(AnforderungsBestaetigungsHBReport.java:300)

 

at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:420)

 

... 42 more

 

coud that be a Bug in JasperReports?

can anybody help me?

 

many thanks in advance

 

 

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: Trouble with printWhenExpression

2004-11-09 08:14

The printWhenExpression you have shown us is a different one than is throwing the error: VERBRAUCHSDATUM vs. SERIENNR

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...