I sent a request to codejock about a problem with formula in a footerRecord, The sample is written in FoxPro.
SUPPORT REQUEST:
Can I use formula in a footerRecord Item .
** Sample in Foxpro : See picture attached .
wndReport = main.oactiveclass.otoPGRID.xTremeReportControl.obJECT
wndReport .ClearContent()
wndReport .Columns.DeleteAll()
wndReport .FooterRecords.DeleteAll()
True = .t.
False = .f.
wndReport.Columns.Add( 0, "Product", 100, True)
wndReport.Columns.Add( 1, "State", 100, True)
wndReport.Columns.Add( 2, "Sales", 100, True)
wndReport.Columns.Add( 3, "", 100, True)
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("Pen")
xRecordItem = xRecord.AddItem("NSW")
xRecordItem = xRecord.AddItem("20")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("paper")
xRecordItem = xRecord.AddItem("NSW")
xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("Books")
xRecordItem = xRecord.AddItem("NSW")
xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("Pen")
xRecordItem = xRecord.AddItem("SA")
xRecordItem = xRecord.AddItem("20")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("paper")
xRecordItem = xRecord.AddItem("SA")
xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("Books")
xRecordItem = xRecord.AddItem("SA")
xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("Pen")
xRecordItem = xRecord.AddItem("WA")
xRecordItem = xRecord.AddItem("20")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("paper")
xRecordItem = xRecord.AddItem("WA")
xRecordItem = xRecord.AddItem("12")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("Books")
xRecordItem = xRecord.AddItem("WA")
xRecordItem = xRecord.AddItem("10")
*-------------------------------------------
xRecord = wndReport.Records.Add()
xRecordItem = xRecord.AddItem("")
xRecordItem = xRecord.AddItem("Total")
xRecordItem = xRecord.AddItem("")
xRecordItem.Format = "%d"
xRecordItem.Caption = ""
xRecordItem.Formula = "SUM(R0C2:R9C3)"
xRecordItem.Editable = False
*******************************
*************************************
xRecordF = wndReport.FooterRecords.Add()
xRecordItem = xRecordF.AddItem("")
xRecordItem = xRecordF.AddItem("Total")
xRecordItem = xRecordF.AddItem("")
xRecordItem.Format = "%d"
xRecordItem.Caption = ""
xRecordItem.Formula = "SUM(R0C2:R9C3)"
xRecordItem.Editable = False
************************************************
******************************************************************
With wndReport
.PaintManager.ColumnStyle = 4 &&xtpColumnOffice2007
.AllowColumnSort = True
.AllowColumnReorder = False
.AllowEdit = True
.FocusSubItems = True
.ShowFooterRows = true
EndWith
wndReport.PaintManager.RecOrRowNumber = False
wndReport.PaintManager.StartRecOrRowNumber = 1
wndReport.PaintManager.TreeIndent = 40
wndReport.PaintManager.GroupIndentColor = RGB(255, 0, 0)
wndReport.Populate
wndReport.ReCalc(.t.)