becks22
7th January 2009, 12:28
Hi all ,
I am using sum function in report script but i m getting an error as "Unresolved reference to sum" .Do i need to specify any library function or any kind of declaration
bdittmar
7th January 2009, 12:52
Hi all ,
I am using sum function in report script but i m getting an error as "Unresolved reference to sum" .Do i need to specify any library function or any kind of declaration
Hello,
how do you use SUM ?????
In reports often TOTAL is used.
You have to be more specific or post your codesnipe.
Regards
becks22
7th January 2009, 13:22
Hi sir ,
Actually I need to print the total of details fields ..But i need to first store the values in a variable ...n for that purpose i m using
selectdo
total.value = x * y
endselect
total.values=sum(total.value)
but i m gettin the error as "Unresolved Reference to Sum"
bdittmar
7th January 2009, 13:30
Hi sir ,
Actually I need to print the total of details fields ..But i need to first store the values in a variable ...n for that purpose i m using
selectdo
total.value = x * y
endselect
total.values=sum(total.value)
but i m gettin the error as "Unresolved Reference to Sum"
BaanERP Programmers Guide
SELECT <select list>
--------------------------------------------------------------------------------
The SELECT clause specifies the table fields that must be represented in the output and the functions (if any) that must be executed on the selected fields. You can use the wildcard character to specify all fields of all tables. You can specify all fields of a particular table by suffixing the table name by the wildcard character .
You can use the following functions in the SELECT clause:
min(<field name>) – for the minimum value of the field
max(<field name>) – for the maximum value of the field
sum(<field name>) – for the sum of the values of the field
count(<field name>) – for the number of fields selected
count(*) – for the number of records selected
avg(<field name>) – for the average value of the field.
These functions consider all selected records as one group and are executed on that group. So they produce a single result – for example, the average value of a specified table field. You usually use these functions in combination with the GROUP BY clause. With this clause, you can group the results into a number of subsets. The function is then performed on each subset.
Related topics
Baan SQL
In reports :
before.field:
set variable to 0 (zero)
detail.x:
after.layout:
variable = variable + value
after.field:
variable
In words :
Set variable to zero in before.field.
Increase variable in report.detail in after.layout.
Show the total value stored in variable in after.field section.
Regards