shahinengg Posted June 21, 2012 Share Posted June 21, 2012 Hello,I am using iReport 3.7.1. I have designed a report with a subreport. When I run the report using ireport, it works well. Then I need to include this report into my web application where I am using struts2, java, tomcat etc.When I call the report using Java Servlet, it displays only Master Report data, but subreport data is not displayed. I have already passed one day on it but I did not get any output.PLEASE HELP ME ASAP. I also attached both jrxml files and Java servlet code.Thanks.shahinCode: Link to comment Share on other sites More sharing options...
gdmoreno Posted June 25, 2012 Share Posted June 25, 2012 I would say you're almost there. I think you're not seeing your subreport data because you're not adding in the compiled subreport object (which you named jasperDesignsub) to the parameters Map object. To see what I mean, check out the samples directory that ships with the JasperReports Library. In the jasperreports-pro-4.5.0/jasperreports/demo/samples/subreport\src directory there is a Java source file called SubreportApp.java that you can take a look at. I tested and it works. Specifically the "fill" method looks like this:Code: Link to comment Share on other sites More sharing options...
jonaslc Posted November 19, 2018 Share Posted November 19, 2018 Adicione um parametro no relatório e inclua o parametro na hora de gerarparams.put("subReport", "/relatorios_jasper/subOcorrencia.jasper");[/code] 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