NeO_GeO Posted November 14, 2008 Share Posted November 14, 2008 Hi all,Everyone knows the way to populate a report in java enviroment by implementing the class JRDataSource: JasperFillManager.fillReport(JasperReport jReport,JRDataSource dataSource,HashMap lParameters) but how to populate a SubDataset with a name inside the report with an implementation of JRDataSource ? I have not found a documention or an example about this. Hoping for an example of java code in the meantime I thank you. Link to comment Share on other sites More sharing options...
lucianc Posted November 17, 2008 Share Posted November 17, 2008 You can create a JRDataSource parameter in the master and use its value as subdataset data source:<parameter name="SubDataSource" class="net.sf.jasperreports.engine.JRDataSource"/>...<datasetRun subDataset=".."> <dataSourceExpression>$P{SubDataSource}</dataSourceExpression></datasetRun>//in your Java codelParameters.put("SubDataSource", mySubDataSource);HTH,Lucian Link to comment Share on other sites More sharing options...
NeO_GeO Posted November 19, 2008 Author Share Posted November 19, 2008 Great Luncian !I ' ve resolved my problem. Link to comment Share on other sites More sharing options...
mail1301 Posted September 30, 2014 Share Posted September 30, 2014 Or you can use better $P{REPORT_DATA_SOURCE} with fillReport method Link to comment Share on other sites More sharing options...
akthar.itzme Posted February 2, 2016 Share Posted February 2, 2016 Valuable answer. Working Great !!! 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