How can I get an element from a subreport?

Hello,

is it possible to get an element (e.q. JRTextfield) programmatically from a subreport?

I know I can use the method "JRBand.getElementByKey(...)" to get an element from a band. The band can I get when I use the method "JasperReport.getDetailSection().getBands();"

But I would get an element from a subreport and not from the master report.

Thanks.

orebil

libero's picture
729
Joined: Jul 23 2009 - 5:55am
Last seen: 1 week 1 day ago

5 Answers:

There is an option of defining 'Return Values'

take a look here: http://community.jaspersoft.com/questions/534659/how-return-value-subreport

grafro's picture
274
Joined: Jul 3 2015 - 2:58am
Last seen: 1 month 1 week ago

Hello,

thank you for the answer, but this isn't the solution for my problem. :-)

II wouldn't get a return value from a subreport but I would get an element from the subreport to change e.q. the markup of a JRTextfield.

orebil.

libero's picture
729
Joined: Jul 23 2009 - 5:55am
Last seen: 1 week 1 day ago

JRSubreport is inherits from JRElement.

hozawa's picture
190415
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

Hello,

I know that JRSubreport is inhertis from JRElement, but this doesn't help me.

I wouldn't change the subreport I would change an element e.q. JRTextField in the subreport.

Thanks.

 

libero's picture
729
Joined: Jul 23 2009 - 5:55am
Last seen: 1 week 1 day ago

Hello,

any other ideas?

orebil

libero's picture
729
Joined: Jul 23 2009 - 5:55am
Last seen: 1 week 1 day ago
Feedback