Solved

On Get Footer Summary Styles Event assistance

Posted on 2013-02-04
9
395 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 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