Reputation: 619
I have a flowfield that sums up a decimal value, but I need to limit the value in a report based on a date field that will be supplied as a parameter in a report. How best do I achieve this? a shortened version the CALC formula in the field definition looks like this:
Sum("MyTable".Unit WHERE (Institution=FIELD(No)))
When the report is run, there is a filter on MyTable based on a date field. Does this field evaluate to the total sum of all the records, or just the filtered values?
Upvotes: 0
Views: 846
Reputation: 2324
No. Just filter on any field doesn't applies to flow fields.
You must use flowfilter to achieve this.
Your code should look like this:
MytableVar.reset;
MytableVar.setrange("Date Filter", 0D, TODAY);
MytableVar.calcfields(Unit);
where Date Filter
is a field in the My Table
with type flowfilter
.
If My Table
is used as Source Table it will work in tha same way. Just apply filter to Date Filter
field.
For further reference see Inventory
filed in the Item
table.
Upvotes: 1