stinus Posted November 17, 2011 Share Posted November 17, 2011 is it possible to use a filled report as subreport ?According the manual the subreportexpression has to be of the type :java.lang.Stringjava.io.Filejava.net.URLjava.io.InputStreamnet.sf.jasperreports.engine.JasperReportA JasperReport file isn't filled yet, so only the java.io.InputStream is left, but how to create the inputstream, from whitch file type do I have to start ? JasperPrint ?On my main report :<subreportExpression class="java.io.InputStream"><![CDATA[$P{SubReport}]]></subreportExpression>and as parameter I pass the java.io.InputStream... Link to comment Share on other sites More sharing options...
augarte Posted November 18, 2011 Share Posted November 18, 2011 Hi stinus, In one of my reports where I use subreports, it is defined as follows: <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "DevFil_subreport1.jasper"]]></subreportExpression>And the "SUBREPORT_DIR" is defined in the beginning of the file as follows: <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["..//jrx//"]]></defaultValueExpression> </parameter>HTH,Regards 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