Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighting bottom 10

Status
Not open for further replies.

ScottWood

Technical User
May 31, 2001
81
GB
I have a report that shows branches and the percentage of sales that they have done, what i would like to do is highlight the 10 branches with the lowest percentage, i dont want to order it by the percentages i want to keep them in branch order, can anyone help?
 
Consider creating a subreport in the report heade that identifies the 10 branches, then pass them as a shared array back to the main report, then do a check against the array for each branch (you'll be grouped by branch, so you can do this in the Group Header) being in the array, and highlight accordingly.

-k
 
Do you know how many branches there are? Is it a fixed number?

If it is you can just simply put a flag that will turn on a background color of a row as soon as n - 10 branches have printed.

I usually don't highlight a row this way though since it goes into the margins...instead I put an empty text field over the entire area(section) that I want to see color....give it the appropriate color for a background but keep up suppressed until I want it.

So have an initialiuzation formula suppressed in the Gruop header

@Initialization
WhilePrintingRecords;
if not inRepeatedGroupHeader then
Numbervar iCount := 0;


A counting Formula in the detail section..

@Counting
WhilePrintingRecords;
Numbervar iCount ;

iCount := iCount + 1;

And in the conditional suppress of the text field used for background color

WhilePrintingRecords;
Numbervar iCount ;
Numbervar TotalCount ;

TotalCount - iCount <= 10;


Jim Broadbent
 
I have created a subreport which shows the bottom 10 stores, but i am unsure on how to create the shared array to check and match the stores?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top