Hello all!
Im new here and also to Navision scene. My problem is the following:
I have created a field in a table, type FlowField with the CalcFormula = Count("Domestic Declaration Line" WHERE (Type=CONST(Purchase),Posting Date=FILTER(01/11/12..30/11/12),VAT Registration No.=FIELD(VAT Registration No.)))
Now, this field in the Table, named "Count Purchase" has to be displayed in a report wich create some totals from this table based on some filters, etc.
I assigned a global variable cntEntries to this field from the table and I have put it in the Group Footer section of the report.
In the PreSection of the Group Footer i've put: cntEntries := DomesticDeclarationLine."Count Purchase";
Where DomesticDeclarationLine is my table and Count Purchase is my field created as FlowField wich does some counting based on the above CalcFormula.
My problem is it displays 0 all the time, although if I open the form related to that table, the counting is correct.
Where is could be the problem?
Thanks a million for any help!
0
Comments
And also you should move in OnAfterGetRecord trigger: if you need to perfom any totalization on this field, you can set it in TotalFields property of the DataItem and use directly "Count Purchase" in GroupFooter sections.
It isnt working, it outputs the same result for for all the entries.
I want to better explain the situation:
I have a GroupFooter in a report with has a GroupTotals propery by a unique VAT number and has TotalFields for the Amount corresponding to each VAT number. All this date comes from Domestic DeclarationLine table in wich I have multiple Purchase type entries for each VAT number, thus the necessity of a totalling. I needed to COUNT those Purchase entries based on certain date filters and VAT Number. And it does well at the table level. But when I put it in the Group Footer section of the report, it just outputs wrong numbers....even though I've put CALCFIELDS where you directed me to put em.
I will attach some print screen maybe it will help me to express better.
In the property Code of the report you need to write:
Then you need to create a textbox in report body, with this code in the hidden property:
If you want tu write more fields in footer:
Then in the textbox where do you want display the field you need to write in the value expresion
if you want to display more fields you need count the position of field in the Code.SetData
I hope that works
Regads