2006 IR Open Dicussion Posted August 26, 2006 Share Posted August 26, 2006 By: Daniel R - doctor_jay Problem passing ResourceBundle to Subreport  2006-01-12 02:23 Hi,ÂÂI've got a main report with a couple of subreports. In order to have multi language reports I pass a ResourceBundle object to the main report as parameter in the report parameters map:ÂÂHashMap params = new HashMap(); Â...Âparams.put(JRParameter.REPORT_RESOURCE_BUNDLE, myBundle); params.put(JRParameter.REPORT_LOCALE, locale);ÂÂThen I pass the parameters map to the JasperFillManager method.ÂÂIn the subreport elements in the main report I set the parametersMapExpression as ÂÂ- new HashMap($P{REPORT_PARAMETERS_MAP} -ÂÂ(I also tried - $P{REPORT_PARAMETERS_MAP - )ÂÂThe $R {} text fields are displayed in the main report but in the subreports they are all _null_. Data from the datasources are displayed correctly.ÂÂAnyone an idea how to solve this?ÂÂGreetz Daniel By: Lucian Chirita - lucianc RE: Problem passing ResourceBundle to Subrepo  2006-01-12 06:35 HiÂÂYou'll have to pass the resource bundle as an explicit subreportParameter:Â<subreportParameter name="REPORT_RESOURCE_BUNDLE">Â<subreportParameterExpression><![CDATA[$P{REPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression>Â</subreportParameter>ÂÂHTH,ÂLucian By: Daniel R - doctor_jay RE: Problem passing ResourceBundle to Subrepo  2006-01-12 07:12 Thanks a lot. Worked nicely! :-) By: Lucian Chirita - lucianc RE: Problem passing ResourceBundle to Subrepo  2006-01-12 08:16 I've commited a fix to CVS that passes the resource bundle from the bulk parameter values map to the subreport when the subreport doesn't have its own resourceBundle property.ÂÂRegards,ÂLucian 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