Hey all,
I'm tryng to do an avarage on sales table.
The table is designed that I have months on the top (column) jan, feb... dec
and rows are devided by years
2010
2011
2012
I need to do an avarage for each year.
and for 2012 I counted the number of the month month(CurrentDate())
and will devide by it.
I have a problem using GridLabelAt when I'm trying to read lable '2012' from my table
I can't find the correct systax for it, this is my code:
if GridLabelAt(year({Sap_Crystal_Logistic;1.DocDate})=2012) then
(
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Jan"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Feb"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mar"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Apr"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("May"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Jun"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Jul"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Aug"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Sep"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Oct"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Nov"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Dec"), CurrentSummaryIndex)
)
else 99999
Help me correct it please..
Also if you have a better method I would like to hear it.
Thanks