tdjones Posted July 7, 2009 Share Posted July 7, 2009 I'm running into a problem. In my report I'm returning a string from a subreport in the details band. But when I set the evaluationTime='band' the text field no longer expands when the data overflows. Do text fields only stretch with evaluationTime='now'? Anyone know of a work around?Code:<detail> <band height="87" splitType="Stretch"> <subreport isUsingCache="false"> <reportElement x="0" y="0" width="0" height="20"> <printWhenExpression><![CDATA[boolean.TRUE]]></printWhenExpression> </reportElement> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="PUB_ID"> <subreportParameterExpression><![CDATA[new Integer($F{pd_pub_id}.intValue())]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <returnValue subreportVariable="names" toVariable="NAMELIST"/> <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "AR_pub_names.jasper"]]></subreportExpression> </subreport> <textField isStretchWithOverflow="true" evaluationTime="Auto"> <reportElement x="31" y="0" width="262" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$V{NAMELIST}]]></textFieldExpression> </textField> </band> </detail> Link to comment Share on other sites More sharing options...
tdjones Posted July 27, 2009 Author Share Posted July 27, 2009 bump Link to comment Share on other sites More sharing options...
C-Box Posted July 27, 2009 Share Posted July 27, 2009 IMHO this is not feasible.If you have a SubReport ReturnVariable that is multiple lines text you should make your field as tall as the maximum height could be. Just imagine, if you place your SubReport below that ReturnVariableField that could stretch, the whole content should move downwards AFTER the SubReport run..... but this could also cause PageBreaks and Recalculations of other expressions...So that the SubReport actually should be rendered again... so kind of infinity loop. So as I know this can't work... I did always increase the fields defined height to three lines (39 Pixel for Arial 10) if I know that the SubReportReturnVariable could max return 3 lines of text. hthC-Box 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