Print Page | Close Window

Footer Sum

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19388
Printed Date: 23 November 2024 at 6:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Footer Sum
Posted By: yfphang
Subject: Footer Sum
Date 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...








Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net