jamesatollefson Posted March 8, 2022 Share Posted March 8, 2022 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!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now