hagar.zakaria.2011 Posted February 4, 2018 Share Posted February 4, 2018 Hello All,I am facing some troubles using csv query executer with subreports. I am using input stream as the csv source and pass it to the main report from java using JRCsvQueryExecuterFactory.CSV_INPUT_STREAM.I pass the CSV_INPUT_STREAM to the subreport as a subreportParameter. <subreport> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="2000" height="200" isRemoveLineWhenBlank="true" uuid="593c792e-5d7c-4f41-8704-9857b7c8851b"/> <subreportParameter name="CSV_INPUT_STREAM"> <subreportParameterExpression><![CDATA[$P{CSV_INPUT_STREAM}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="sheetNo"> <subreportParameterExpression><![CDATA["1"]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA[$P{subreport}]]></subreportExpression> </subreport>When I run the report , the subreports appears blank. If I run the subreport alone without the main report the data is displayed correctly.Does anyone has any idea what is missing?Thanks in advance Link to comment Share on other sites More sharing options...
narcism Posted February 6, 2018 Share Posted February 6, 2018 It is possible that your InputStream is already "consumed" when it reaches the subreport. Depending on its implementation, the InputStream might be "reset"-able. But if you are in hold of its creation mechanism maybe you could use a different approach. 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