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

owen.gerig

Recommended Posts

Im having trouble creating a summary field in my report.  I have read through the guide and found some other post but none have resolved this for me.  I need this summary to either be a text field, or a seperate table however the table should only have 1 row with the summary data.  currently my summary table has multiples rows which is not right.

here is my report

Untitled(7).png.d54f1cfbadfe8366f9f5052e73807700.png

This is what i get when i run it.  Take in mind this is just one page of the report there are multiples.  Also take in mind that the first table has multiples rows, and as you can see so does the second

table.  This is the issue.  My summary table (Account Total) should only be one row with the totals

Untitled(8).png.512ea4b22dffcc7cf01ea14032844377.png

I have 2 variables fueling this

  <variable name="TotalMinutes" class="java.lang.Integer" calculation="Sum">   <variableExpression><![CDATA[sUM($F{Minutes})]]></variableExpression>  </variable>  <variable name="TotalRates" class="java.lang.Double" calculation="Sum">   <variableExpression><![CDATA[sUM($F{Rate})]]></variableExpression>  </variable>[/code]

 

And here are those variables being assigned to their respective columns

     <jr:column width="100" uuid="49cf0069-c8bb-470a-a6ca-503765876094">      <jr:columnHeader style="Table_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="100" height="30" uuid="f72ca0b9-653d-4711-9256-9dc666bb0fbb"/>        <box padding="2"/>        <textElement textAlignment="Center" verticalAlignment="Middle">         <font isBold="true"/>        </textElement>        <text><![CDATA[Minutes]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="Table_TD" height="30">       <textField isStretchWithOverflow="true" isBlankWhenNull="true">        <reportElement x="0" y="0" width="100" height="30" uuid="ed9bc872-2718-4a10-9b34-518affaa1e07"/>        <box padding="2"/>        <textElement textAlignment="Center" verticalAlignment="Middle"/>        <textFieldExpression><![CDATA[$V{TotalMinutes}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>     <jr:column width="100" uuid="9dd38474-bdee-4b77-9a8c-bb19a7ad20ff">      <jr:columnHeader style="Table_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="100" height="30" uuid="8d384cc3-21cd-4811-b785-b9e8376c086d"/>        <box padding="2"/>        <textElement textAlignment="Center" verticalAlignment="Middle">         <font isBold="true"/>        </textElement>        <text><![CDATA[Rate]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="Table_TD" height="30">       <textField isStretchWithOverflow="true" isBlankWhenNull="true">        <reportElement x="0" y="0" width="100" height="30" uuid="ca5b3e91-6a04-4c96-916c-9748ab42deeb"/>        <box padding="2"/>        <textElement textAlignment="Center" verticalAlignment="Middle"/>        <textFieldExpression><![CDATA[$V{TotalRates}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>[/code]

I have tried changing the Increment Type to Report but that did not help (removed the summing it did and still made multiples rows in the table)

I also tried adding a text field then referencing the variables, but it does not have access to them (doesnt see them, out of scope appearently)

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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...