Print Page | Close Window

[SOLVED] Total in Footer

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=17343
Printed Date: 05 October 2024 at 2:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Total in Footer
Posted By: JamGodz
Subject: [SOLVED] Total in Footer
Date Posted: 28 September 2010 at 11:25am
Hi Everyone! Good day!

How can i display total in footer.

pls..



Replies:
Posted By: Aaron
Date Posted: 28 September 2010 at 1:46pm
Hi,
 
If you are trying to use SUM in your FooterRecords, it isn't implemented yet... Maybe in next release...
 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Xander75
Date Posted: 29 September 2010 at 5:30am
Hi,

You could do this once your ReportControl is populated, using a loop to count the data required and then update the footer.


    Dim dColVal as Double
    Dim Record as ReportRecord
   
    dColVal = 0

    For i = 0 To ReportControl.Records.Count - 1
        Set Record = ReportControl.Records.Record(i)
        dColVal = dColVal + cdbl(Record.Item(5).Value)
    Next

    ReportControl.Columns(5).FooterText = dColVal
    ReportControl.Populate



-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: SHAN
Date Posted: 29 September 2010 at 10:15am
Hi Thanks for the Code....!
 
It works  for the footer total... !
 
Untill CJ implements this footer total we can use your solution.....!


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows 7 Professional
Language: Visual Basic 6.0


Posted By: SHAN
Date Posted: 29 September 2010 at 10:32am
Hi,
 
Now i have a question , How do I highlight the footer total as Bold/ Different foreColor/ Backcolor...?
 
Is that possible?
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows 7 Professional
Language: Visual Basic 6.0


Posted By: Xander75
Date Posted: 29 September 2010 at 10:50am
Hi,
 
I know you can change the Footer Font, Style, Size etc by using the following code:
 

    Dim Column As ReportColumn
    Set Column = rpcGrid.Columns(1)
    With Column
        .FooterAlignment = xtpAlignmentRight
        .FooterFont.Bold = True
        .FooterFont.Italic = True
        .FooterFont.Name = "Courier New"
        .FooterFont.Size = "12"
    End With
 
However I don't believe there's a way to change the Font ForeColor or Backcolor.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: SHAN
Date Posted: 29 September 2010 at 11:18am
Waw  Thanks for Quick Reply
It works..........
 
What about ForeColor and BackColor?
 
Is that possible to Change also....???


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows 7 Professional
Language: Visual Basic 6.0


Posted By: Xander75
Date Posted: 29 September 2010 at 11:28am
Hi,

If you look in my previous posting at the bottom I did say "However I don't believe there's a way to change the Font ForeColor or Backcolor."

I did try to do this but I was unsuccessful in finding a solution. I had a look at using Markup but I am unsure if this is possible either.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: SHAN
Date Posted: 29 September 2010 at 11:33am
Ok Thanks..
 
Let us expect in the future CJ release....


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows 7 Professional
Language: Visual Basic 6.0


Posted By: cbs
Date Posted: 22 March 2011 at 5:52pm
Hi Xander75,

Can you suggest where to place this loop to produce the footer totals?

Thanks,
CBS


Posted By: Xander75
Date Posted: 13 April 2011 at 10:41am
Hi cbs,

The loop can be placed anywhere within your code after the grid has been populated with the data. This method creates a column footer, not the best method I think!

The following link shows another way in which to do this instead with using the FooterRow technique: http://forum.codejock.com/forum_posts.asp?TID=18062 - http://forum.codejock.com/forum_posts.asp?TID=18062

There's a few screenshots to show you how I did it and the code to reproduce it too, which I believe I did for you too cbs Wink

Anyways, I hope this helps.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)



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