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

Bug report
Project: Severity:
Component: Reproducibility:
Assigned to:

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

-- some details band's columns
<band height="36" splitType="Immediate" >
<repprintWhenExpressionortElement style="LineStyle" x="0" y="1" width="550" height="1" uuid="01d8e550-84f6-4bbb-bab1-9ad9fbdcc21c"/>
<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">
<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>

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.

atulnamdeo7's picture
Joined: Feb 26 2020 - 11:05pm
Last seen: 8 months 1 week ago