Hello, im trying to make out of 2 tables 1 and then print the information on a report. And this worked only that the amount is ever 0. So i looked in the table from where i copy my records the properties of the amount field and found out there is no value stored, and theres some sum() stuff in the Calcforumla.
So after a search i found out, that i have to make a calcfields before i copy the fields. But the amount field on the report is still zero.
filling works like:
IF Verkaufskopf.FINDSET THEN REPEAT
Verkaufskopf.CALCFIELDS(Betrag, “Betrag mit MWSt”);
tmpVerkKopf := Verkaufskopf;
UNTIL Verkaufskopf.NEXT = 0;
–
nav 2009
In which trigger have you written this?
where did you add the field in sections?
Claissc/RTC?
In the OnAfterGetRecord, and like i said the filling works well just not the amount field…
In the Body Section i have a field with sourceExpression tmpVerkKopf.Amount. Fields like tmpVerkKopf.Number are working.
Is this code under Verkaufskopf Dataitem OnAfterGetrecord trigger?
Does the last record in Verkaufskopf table has Amount <> 0?
DataItems:
-sellers/buyers | sellersbuyers
- -Integer | Offerten
In the sellers DataItem OnAfterGetRecord i make a filter on the table SalesHeader(record var) to look only for current seller and many other filters… then i make a loop throug the SalesHeader(record var) like this:
IF SalesHeader.FINDSET THEN REPEAT
SalesHeader.CALCFIELDS(Amount, “Amount mit MWSt”);
tmpVerkKopf := SalesHeader;
tmpVerkKopf.INSERT;
UNTIL Verkaufskopf.NEXT = 0;
In the Offerten DataItem I use this to print the Information form the TempTable I have the
Properties: DataItemTableView: SORTING(Number) WHERE(Number=FILTER(1…))
OnAfterGetRecord:
IF Number = 1 THEN
tmpVerkKopf.FINDFIRST
ELSE IF tmpVerkKopf.NEXT = 0 THEN
CurrReport.BREAK;
Write below code in Integer dataitem at the end of above code…
tmpVerkKopf.CALCFIELDS(Amount, “Amount mit MWSt”);
Yaaayy this worked [:D] thanks! but can you explain me why, i have to make a calcfields on the temporary table?
No need to write this code unless you want to use sales header amount field some where…
SalesHeader.CALCFIELDS(Amount, “Amount mit MWSt”);
As you are trying to show the values from Temp table, you need to calculate flowfield of temp table only.