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

jamesatollefson

Members
  • Posts

    3
  • 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 jamesatollefson

  1. Error attached. Here are my two classes and interface: class BatchRegionResult extends BatchRegionReportData { public SignedInfo getSignedInfo() { return getData().getBatch().getSignedInfo(); } } class BatchRegionReportData implements ReportData { @Override public BatchRegion getData() { return batchRegion; } } public interface ReportData { Object getData(); } Defining variables: signedInfo: (This version works because of the method getSignedInfo() I added to BatchRegionResult) HOWEVER I want the logic to be in the jrxml. This is my workaround using the method to show it works this way.Expression $F{batchRegionResult}.getSignedInfo()Value Class Name com.agenabio.container.plates.SignedInfosignedInfo: (This version does not work and throws the error)Expression $F{batchRegionResult}.getData().getBatch().getSignedInfo()Value Class Name com.agenabio.container.plates.SignedInfoI feel like there is an issue with the jrxml because it calls the interface method getData() which has return type Object. BUT the class implementing it overrides it with the return type BatchRegion. So now I keep getting the error "The method getData() is undefined for the type BatchRegionResult. How can I get this to work so that I can call $F{batchRegionResult}.getData().getBatch().getSignedInfo() directly in the jrxml expression? Thanks for the help!!
  2. Here are my two classes and interface. class BatchRegionResult extends BatchRegionReportData { public SignedInfo getSignedInfo() { return getData().getBatch().getSignedInfo(); } } class BatchRegionReportData implements ReportData { @Override public BatchRegion getData() { return batchRegion; } } public interface ReportData { Object getData(); } As you can see, BatchRegionReportData implements ReportData and overrides getData (and declares the return type as as a BatchRegion and NOT an object). I have tried various solutions but all of them end up throwing this error I have attached: "the method getData is undefined for the class BatchRegionResult" The only way I could get around this was to add the method getSignedInfo() to BatchRegionResult and return getData().getBatch().getSignedInfo(). HOWEVER, I want to do getData().getBatch().getSignedInfo() in the jrxml instead. Defining variables: signedInfo: (This version works because of the method getSignedInfo() I added to BatchRegionResult) HOWEVER I want the logic to be in the jrxml. This is my workaround using the method to show it works this way. Expression $F{batchRegionResult}.getSignedInfo()Value Class Name com.agenabio.container.plates.SignedInfosignedInfo: (This version does not work and throws the error)Expression $F{batchRegionResult}.getData().getBatch().getSignedInfo()Value Class Name com.agenabio.container.plates.SignedInfosignedInfo: (This version does not work and throws the error. I tried casting here)Expression ((com.agenabio.container.plates.BatchRegion)$F{batchRegionResult}.getData()).getBatch().getSignedInfo()Value Class Name com.agenabio.container.plates.SignedInfobatchregion: (This throws the error, I figured I would try to isolate this getData and define it's class name and then use this variable to get the signed info)Expression $F{batchRegionResult}.getData()Value Class Name com.agenabio.container.plates.BatchRegionbatchregion: (This throws the error, I tried casting)Expression (com.agenabio.container.plates.BatchRegion) $F{batchRegionResult}.getData()Value Class Name com.agenabio.container.plates.BatchRegionI feel like there is an issue with the jrxml because it calls the interface method getData() which has return type Object. BUT the class implementing it overrides it with the return type BatchRegion. So now I keep getting the error "The method getData() is undefined for the type BatchRegionResult. How can I get this to work so that I can call $F{batchRegionResult}.getData().getBatch().getSignedInfo() directly in the jrxml expression? Thanks for the help!!
  3. I have tried every cobination of positionType and stretchType and evaluation time. Nothing has worked. I even made sure the print order is vertical. I used jasper version 6.11 and even upgraded to 6.17. No success. Whenever the dynamic text from the variable is longer than the text field and takes up a second line, it only shows the first line. Here is my simple text field: <textField textAdjust="StretchHeight" evaluationTime="Auto"> <reportElement positionType="Float" stretchType="ContainerHeight" x="0" y="80" width="190" height="16" uuid="939ca8a9-5c57-445a-8992-54babc9c7302"/> <textFieldExpression><![CDATA[$V{signedInfo}.getSignedComments()]]></textFieldExpression> </textField> I also attached my full jasper report
×
×
  • Create New...