[#4373] - Add ability to specify Evaluation Time in Styles and "Print When Expression"

Category:
Feature request
Priority:
High
Status:
Feedback Requested
Project: Severity:
Feature
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
1

I can specify evaluation time of a summary Variable for a Group, to derive the desired contents for printing.

When I want to condition print characteristics of an element based on the value of this Variable, to obtain a valid result sometimes I must evaluate the Variable at some time other than "Now", e.g., at "Group".

Please add either an independent "Evaluation Time" for "Print When Expression" with the same values as apply to the Text Field Expression, with an additional value of "Match Evaluation Time for Text Field Expression".

Having this new attribute as potentially independent from the Text Field Expression Evaluation Time means that I can condition many elements (including statics) in a group header based on the end-of-group value of a group summary variable.

It will also be much easier to implement than using the Text Field Markup property.

It will be possible to condition the printing of statics based on an Evaluation Time of other than "Now".

Consider adding this property to Styles, as well, as I think this would be useful there.

PlexPro's picture
46
Joined: May 11 2008 - 11:34pm
Last seen: 2 years 4 months ago

6 Comments:

#1

Buenas atodos
Tengo un problema con el iReport 5.0.4
El problema consiste en que cuando declaro la evaluacion en el tiempo como AUTO de una variable y le marco para que en caso de remoeva la linea cuando sea blanco este no me funciona nunguno de los otros propiedades para esta variable. pero si evaluacion en el tiempo esta con NOW funciona correctamente, y se me es inprecindible que esto este como AUTO

Gracias de antemano...

AttachmentSize
Binary Data rep_ver_6cortes.jrxml75.17 KB
#2
  • Priority:Normal» High
  • Severity:Minor» Feature

Hi @all,

I can only support this!

Print When Expressions should stick to the evaluation time of the element (e.g. a text box) or even better get an own evaluation time attribute.
A.t.m. it is not possible to print (or not) elements/bands based on the value of a variable at the end of a group/report.

That´s really annoying!

That´s also the case for Print When Expressions of bands and static text fields - there´s no possibility to setup when the Print When Expression should be evaluated.

regards
Michael

#3
  • Assigned:nobody»

@Giulio,

I am having the same problem, mentioned in this issue. The issue is also related to:
https://community.jaspersoft.com/questions/537414/problem-using-returned...

Am I correct that this issue is assigned to you? If so, is this issue going to be fixed? Do you know a workaround in the mean time?

My problem is that I want to use the record-count ($V{REPORT_COUNT}) in the dataset of a list as return value. That works perfect if I want to display that number, but if I want to use it in a print when expression, the outcome is wrong. I want to use this to hide a frame around a list when there is nof data in the list.

Please, let me know if you can help me.

Thanks,

#4
  • Status:Assigned» New
#5
  • Assigned:nobody» teodord
#6
  • Status:New» Feedback Requested

Hi,

There is a reason for the printWhenExpression to only work for Now evaluationTime.
We need to know if the element is supposed to appear or not at the moment the band is laid out.
Otherwise, people would start abuse the printWhenExpression and have it evaluated later, with the intention that the engine comes back and removes big chunks of report content that have already been laid out.
If a late evaluated printWhen would make entire chunks collapse, then the page breaks that have been put in place after that point and all the page related calculations made would need to be thrown out on the window and everything would need to be laid out and calculated again. And after doing that, maybe the recalculation of the total that caused the collapse of the pringWhen content in the first place would be evaluated to a different value (because it depends on page totals?), which would then say: "Oh, that collapsed section should now be put back".... and so on...

This is why we don't allow it. We need to know upfront if we need to reserve a placeholder for a value that is calculated later and that's it.
You can always make it so that the later calculated value is null and your text field can have blankWhenNull="true".
Also, note that there is this build-in style provider which allows you to use custom properties expressions at element level to control the style properties and they are evaluated at the same time as the text field expression.
You can basically change the color of the element base on a late evaluated value, so you don't need styled text for that:
http://jasperreports.sourceforge.net/sample.reference/crosstabs/index.ht...

I hope this helps.
Teodor

Feedback
randomness