[#13696] - Count of group records in <printWhenExpression> condition with evaluationTime="Group"

Category:
Bug report
Priority:
Immediate
Status:
New
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Overview - In report we are displaying Group header, Detail band, Summary section
Requirement - We want to display "No record found" message if all columns of all records selected in detail band is null but group header band columns's can have data. So if query is not returning any data in that case we are not generating any report but if query returns data but only detail band column's data are null in this case we want to generate report as below-:

Group header 1
No record found

Group Header 2
xyz data
abc data

Group Header 3
No record found

<detail>
<band>
-- some details band's columns
</band>
<band height="36" splitType="Immediate" >
<line>
<repprintWhenExpressionortElement style="LineStyle" x="0" y="1" width="550" height="1" uuid="01d8e550-84f6-4bbb-bab1-9ad9fbdcc21c"/>
</line>
<textField isStretchWithOverflow="true" evaluationTime="Group" evaluationGroup="MultipleGrouping">
<reportElement style="DefaultStyle" positionType="Float" x="0" y="4" width="300" height="12" uuid="82b769df-1317-47fb-a6be-fd1b41fe9f62">
<printWhenExpression><![CDATA[$V{MultipleGrouping_COUNT}.intValue()==$V{COUNT_NULL_GROUP}.intValue()]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Left" markup="styled"/>
<textFieldExpression><![CDATA["<style isBold='true'>" + net.sf.jasperreports.engine.util.JRStringUtil.xmlEncode("No record found evalution" + " "+$V{MultipleGrouping_COUNT} + " " +$V{COUNT_NULL_GROUP})+ "</style>"]]></textFieldExpression>
</textField>
</band>
</detail>

In above code snippet , I'm using 2 variable to MultipleGrouping_COUNT is giving total record count in group and COUNT_NULL_GROUP is giving total null record count in group and added property evaluationTime="Group" to evaluate final values.
But in <printWhenExpression> it is evaluating as per evaluationTime="Now" and at the time of <textFieldExpression> it is printing as per evaluationTime="Group".
I need printWhenExpression condition also to be satisfied by evaluationTime="Group" only.

v6.7.0
atulnamdeo7's picture
Joined: Feb 26 2020 - 11:05pm
Last seen: 4 days 11 hours ago
Feedback
randomness