Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Footer Sum
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Footer Sum

 Post Reply Post Reply
Author
Message
yfphang View Drop Down
Newbie
Newbie


Joined: 24 December 2011
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote yfphang Quote  Post ReplyReply Direct Link To This Post Topic: Footer Sum
    Posted: 06 January 2012 at 12:49am
hi,

would like to find out why i can't perform formula sum and display result in footer ?
below is my code in VB6.0.


    Dim xRecord As XtremeReportControl.ReportRecord
    Dim xRecordItem As XtremeReportControl.ReportRecordItem

    DataLst.ShowFooterRows = True
   
    Set xRecord = DataLst.FooterRecords.Add
    Set xRecordItem = xRecord.AddItem("")
   
     xRecordItem.Bold = True
    Set xRecordItem = xRecord.AddItem("Total:")
   
    For i = 2 To DataLst.Columns.Count - 1
        Set xRecordItem = xRecord.AddItem("")
        xRecordItem.Bold = True
       ' xRecordItem.BackColor = vbBlack
        If i = DataLst.Columns.Count - 1 Then
            xRecordItem.Format = "%.02f"
        Else
            xRecordItem.Format = "%.0f"
        End If
        zz = "SUM(R*C" & i & ":R*C" & i + 1 & ")"
        xRecordItem.Formula = zz
       
        DataLst.Columns(i).Alignment = xtpAlignmentRight
        DataLst.Columns(i).HeaderAlignment = xtpAlignmentRight
        DataLst.ReCalc True
    Next i


if i change the about DataLst.FooterRecords.Add to DataLst.Records.Add i am able to display ...please help...





Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.