Jump to content
Changes to the Jaspersoft community edition download ×

How to avoid to create multiple variables in JRXML ?


shanmugaraj7029

Recommended Posts

Hello to Everyone,

 

I Generated a report through the iReport tool with multiple aggregation operation like sum and count etc.

And I have multiple groups for each variables. So, totaly I have 52 variables in my report.

As Follows :

----------------

1. Groups = 4 and Variables under each group is 13. So, the total will be 52.

 

How to avoid this to create more variables in report.

The sample variable creation in my report as follows :

 

<variable name="cur_vt1" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HOURS}]]></variableExpression>
</variable>
<variable name="cur_vt2" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{DIRECT}]]></variableExpression>
</variable>
<variable name="cur_vt3" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD1}]]></variableExpression>
</variable>
<variable name="cur_vt4" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD2}]]></variableExpression>
</variable>
<variable name="cur_vt5" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD3}]]></variableExpression>
</variable>
<variable name="cur_vt6" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD4}]]></variableExpression>
</variable>
<variable name="cur_vt7" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{GA}]]></variableExpression>
</variable>
<variable name="cur_vt8" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HEADS}]]></variableExpression>
</variable>
<variable name="cur_vt9" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{UNITS}]]></variableExpression>
</variable>
<variable name="cur_vt10" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER1}]]></variableExpression>
</variable>
<variable name="cur_vt11" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER2}]]></variableExpression>
</variable>
<variable name="cur_vt12" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER3}]]></variableExpression>
</variable>
<variable name="cur_vt13" class="java.lang.Integer" resetType="Group" resetGroup="CurrencyGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER4}]]></variableExpression>
</variable>
<variable name="ct_vt1" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HOURS}]]></variableExpression>
</variable>
<variable name="ct_vt2" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{DIRECT}]]></variableExpression>
</variable>
<variable name="ct_vt3" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD1}]]></variableExpression>
</variable>
<variable name="ct_vt4" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD2}]]></variableExpression>
</variable>
<variable name="ct_vt5" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD3}]]></variableExpression>
</variable>
<variable name="ct_vt6" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD4}]]></variableExpression>
</variable>
<variable name="ct_vt7" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{GA}]]></variableExpression>
</variable>
<variable name="ct_vt8" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HEADS}]]></variableExpression>
</variable>
<variable name="ct_vt9" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{UNITS}]]></variableExpression>
</variable>
<variable name="ct_vt10" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER1}]]></variableExpression>
</variable>
<variable name="ct_vt11" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER2}]]></variableExpression>
</variable>
<variable name="ct_vt12" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER3}]]></variableExpression>
</variable>
<variable name="ct_vt13" class="java.lang.Integer" resetType="Group" resetGroup="CostTypeGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER4}]]></variableExpression>
</variable>
<variable name="wp_vt1" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HOURS}]]></variableExpression>
</variable>
<variable name="wp_vt2" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{DIRECT}]]></variableExpression>
</variable>
<variable name="wp_vt3" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD1}]]></variableExpression>
</variable>
<variable name="wp_vt4" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD2}]]></variableExpression>
</variable>
<variable name="wp_vt5" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD3}]]></variableExpression>
</variable>
<variable name="wp_vt6" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD4}]]></variableExpression>
</variable>
<variable name="wp_vt7" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{GA}]]></variableExpression>
</variable>
<variable name="wp_vt8" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HEADS}]]></variableExpression>
</variable>
<variable name="wp_vt9" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{UNITS}]]></variableExpression>
</variable>
<variable name="wp_vt10" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER1}]]></variableExpression>
</variable>
<variable name="wp_vt11" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER2}]]></variableExpression>
</variable>
<variable name="wp_vt12" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER3}]]></variableExpression>
</variable>
<variable name="wp_vt13" class="java.lang.Integer" resetType="Group" resetGroup="WorkPackageGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER4}]]></variableExpression>
</variable>
<variable name="ca_vt1" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HOURS}]]></variableExpression>
</variable>
<variable name="ca_vt2" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{DIRECT}]]></variableExpression>
</variable>
<variable name="ca_vt3" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD1}]]></variableExpression>
</variable>
<variable name="ca_vt4" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD2}]]></variableExpression>
</variable>
<variable name="ca_vt5" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD3}]]></variableExpression>
</variable>
<variable name="ca_vt6" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{OVERHD4}]]></variableExpression>
</variable>
<variable name="ca_vt7" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{GA}]]></variableExpression>
</variable>
<variable name="ca_vt8" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{HEADS}]]></variableExpression>
</variable>
<variable name="ca_vt9" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{UNITS}]]></variableExpression>
</variable>
<variable name="ca_vt10" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER1}]]></variableExpression>
</variable>
<variable name="ca_vt11" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER2}]]></variableExpression>
</variable>
<variable name="ca_vt12" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER3}]]></variableExpression>
</variable>
<variable name="ca_vt13" class="java.lang.Integer" resetType="Group" resetGroup="ControlAccountGroup" calculation="Sum">
<variableExpression><![CDATA[$F{USER4}]]></variableExpression>
</variable>
 
Could you have any idea about, reduce no of variables in the report ? Please can you give any examples for this?
 
 
Thanks,
 
Shanmugaraj S.

 

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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