hi good morning one and all
i have question like this
Create a Matrix box with customers on rows and sales people on Columns and sales amount for each combination
i have taken a new form with source expression sales person/purchaser and record type of customer
i have taken one function amount() with return type text
i have written the code in the function and i have assigned the total sales variable as source expression of text box
cust.RESET;
cust.SETCURRENTKEY(cust."No.");
cust.SETRANGE(cust."No.",Code);
cust.SETRANGE(cust.Name,Name);
cust.SETRANGE(cust."No.",CurrForm.matrixbox.MatrixRec."No.");
IF cust.FINDFIRST THEN
REPEAT
cust.CALCFIELDS(cust."Sales (LCY)");
totalsales :=totalsales+cust."Sales (LCY)";
UNTIL cust.NEXT=0;
exit(format(totalsales));
the out put what i am getting is
0
Comments
And 2:
First you put this this filter on "No.":
cust.SETRANGE(cust."No.",Code);
and now you overwrite the filter:
cust.SETRANGE(cust."No.",CurrForm.matrixbox.MatrixRec."No.");[/code]
You need something like:
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!