Solved

On Get Footer Summary Styles Event assistance

Posted on 2013-02-04
9
401 Views
Last Modified: 2013-06-07
I need to highlight the group summary box based on its value being over $350,000.  My code only gives me NULL values.  Help? (i also included commented code that continues to give me NULL AValues)

//  AIndex :=  AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(gvSalesForecastSales_Amount);
//  AValue := AView.DataController.Summary.FooterSummaryValues[AIndex];
//
//  if ((AColumn = gvSalesForecastSales_Amount) and (AFooterGroupLevel <> -1) and (AValue > 350000)) then AStyle := dmLeads.cxStyle2;

  if (AColumn.Index = 6) and (AView.DataController.Summary.FooterSummaryValues[AColumn.Index] > 350000) then
   AStyle := dmLeads.cxStyle2;

Open in new window

0
Comment
Question by:Bianca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
9 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 38853212
This should work...
AIndex :=  AView.DataController.Summary.FooterSummaryItems.IndexOfItemLink(gvSalesForecastSales_Amount);
AValue := AView.DataController.Summary.FooterSummaryValues[AIndex];

if (AValue > 350000) then AStyle := dmLeads.cxStyle2;

Open in new window

0
 

Author Comment

by:Bianca
ID: 38853219
I tried that and it looks like it keeps giving me the same Index and NULL Value. Trying it again...
0
 

Author Comment

by:Bianca
ID: 38853232
It highlighted all Group Summary items even though they were not more than 350000. Am I using the wrong event?  The summary that I am using values on is the Group Footer Summary Values (not the footer)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Bianca
ID: 38853240
Let me clarify that. I have a subgrouping by date. If the subgrouped values for SalesAmount within that group (that group's summary value) is over $350,000 then highlight that Group Footer Summary Value.
0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 38854059
The right events are OnGetGroupSummaryStyle or OnCustomDrawGroupSummaryCell ...

This will probably help you...
Group summary color based on group by index

Also have a look at the downloadable sample code at the above url...
0
 

Author Comment

by:Bianca
ID: 38855388
I need to apply styles based on values not row index.

How do I get the value of the group footer summary?
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 38858326
are you precreating the footers or letting the users create the footers and then highlight them  ?
0
 

Author Comment

by:Bianca
ID: 38859579
I set the group footer summary on the grid myself.. Those are the values I want to highlight based on if they are greater than $350000
0
 

Author Comment

by:Bianca
ID: 38859693
Here's a screenshot; I want those highlights there but ONLY if that group summary total is over $350000
untitled.bmp
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
update joined tables 2 72
Firemonkey allowing RTL on android 6 77
Firemonkey BASS_Init into a thread 17 80
how can i delete one control based on its tagstring ? 6 58
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question