Jump to content

ResourceBundle and Subreports


3rwin

Recommended Posts

Hi,

I have uploaded a main report and a sub report with their resourcebundles to our JasperServer:

root

mainreports

main.jrxml

resourcebundle.properties

subreports

sub.jrxml

resourcebundle.properties

I've created a $R{title} textfield in my sub.jrxml and defined it in the resourcebundle.properties (in the subreports folder), when I run the subreport on the JasperServer it translated my $R{title}, but when I add the subreport to the main and run the main, the $R{title} doesn't translate and gives me a "null" value for the field.

Does anyone have an idea on how to fix this?

 

kind regards,

Erwin

 

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
  • 2 weeks later...

Lucian,

First of all thanks for the feedback ...

Am I looking at this the wrong way then. I would like to make a subreport with for example a header logo and a date, and use it in many other reports. So if someone askes me to put for example a time in the header I would only have to change the header subreport and all my reports would work.

But I would like to have a Internationalized label "date" before the date and make it so that I only have to translate the label in one place, not in every report that uses my subreport.

Kind regards,

Erwin

Link to comment
Share on other sites

You would have to include the resource bundles that do the "Date" translation in each report you use the sub report in. You can have the JRXML and resource bundles for the sub report as separate objects in the repository, and just refer to them in the report units.

 

 

Sherman

Jaspersoft

Link to comment
Share on other sites

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...