Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

On Get Footer Summary Styles Event assistance

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
Norm-al
Asked:
Norm-al
  • 6
  • 2
1 Solution
 
ThommyCommented:
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
 
Norm-alNetwork EngineerAuthor Commented:
I tried that and it looks like it keeps giving me the same Index and NULL Value. Trying it again...
0
 
Norm-alNetwork EngineerAuthor Commented:
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Norm-alNetwork EngineerAuthor Commented:
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
 
ThommyCommented:
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
 
Norm-alNetwork EngineerAuthor Commented:
I need to apply styles based on values not row index.

How do I get the value of the group footer summary?
0
 
Geert GOracle dbaCommented:
are you precreating the footers or letting the users create the footers and then highlight them  ?
0
 
Norm-alNetwork EngineerAuthor Commented:
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
 
Norm-alNetwork EngineerAuthor Commented:
Here's a screenshot; I want those highlights there but ONLY if that group summary total is over $350000
untitled.bmp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now