3rwin Posted November 3, 2009 Share Posted November 3, 2009 Hi,I have uploaded a main report and a sub report with their resourcebundles to our JasperServer:rootmainreportsmain.jrxmlresourcebundle.propertiessubreportssub.jrxmlresourcebundle.propertiesI'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 More sharing options...
swood Posted November 23, 2009 Share Posted November 23, 2009 Did you add the subreport bundle to the main report unit? ShermanJaspersoft Link to comment Share on other sites More sharing options...
3rwin Posted November 23, 2009 Author Share Posted November 23, 2009 I've added the subreport resourcebundle to the subreport and the mainreport resourcebundle to the main report but ...How do you add a subreport resourcebundle to another (main) report? Kind regards,Erwin Link to comment Share on other sites More sharing options...
lucianc Posted December 3, 2009 Share Posted December 3, 2009 A report unit should contain the master report and all the embedded subreports. If the subreports use different resource bundles than the master report, you should assign distinct names to the resource bundles and upload them to the report unit.Regards,Lucian Link to comment Share on other sites More sharing options...
3rwin Posted December 12, 2009 Author Share Posted December 12, 2009 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 More sharing options...
swood Posted December 19, 2009 Share Posted December 19, 2009 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. ShermanJaspersoft 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