Jump to content
We've recently updated our Privacy Statement, available here ×

Remove extra blank space when no data in subreport


bpamarti

Recommended Posts

Hello:
 
I created a jasperreport with a subreport embedded beneath every row in the main report. Everything works fine but there is an extra white space beneath every row in the main report when there is no data in the subreport.
 
And also in other reports I noticed that there is extra space left unfilled in the detail section eventhough there is space to fit in couple of rows of data.
 
I am sure there has to be some setting to eliminate this whitespace ... can anyone shed some light on this...
 
I have set the isRemoveLineWhenBlank to "true" in the reportElement....below is the code snippet for the subreport in the jrxml file
 
 
Thanks a lot!
 
Code:
<subreport  isUsingCache="true">					<reportElement						x="0"						y="28"						width="760"						height="42"						key="subreport-3"						positionType="Float"						isRemoveLineWhenBlank="true"/>					<subreportParameter  name="pat_mrn">						<subreportParameterExpression><![CDATA[$F{pat_mrn}]]></subreportParameterExpression>					</subreportParameter>					<subreportParameter  name="sch_event_id">						<subreportParameterExpression><![CDATA[new Integer($F{sch_event_id})]]></subreportParameterExpression>					</subreportParameter>					<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{comments})]]></dataSourceExpression>					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "waiting_comments_rpt.jasper"]]></subreportExpression>				</subreport>
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...