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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show a specific N of TopN only

Status
Not open for further replies.

sa0309

Programmer
Apr 5, 2010
45
US
I want to be able to show / chart a specific N of TopN..not all TopN. I can get the TopN to work perfectly.

For example, if I set TopN = 5 and I want to see only result #2 of the 5. Is this possible?

Crystal XI on Win Xp connected to SQL Sever 2000.
 
What is there to chart if you have only one value? What is this the topN of? What is the summary? What is the group structure of the report (what fields are you grouping on)?

-LB
 
I want to be able to select and chart the elements out of Group 2. The TopN is based on totals from Group1.

Say these are my top 3. I want to chart only the 3rd ranked which would be Sub*-CallTypeC.

My data / Grouping would be as follows:

Group #1 CallTypeA 15
Group #2 Sub1-CallTypeA 5
Sub2-CallTypeA 5
Sub3-CallTypeA 5

CallTypeB 75
Sub1-CallTypeB 15
Sub2-CallTypeB 25
Sub3-CallTypeB 35

CallTypeC 6
Sub1-CallTypeC 1
Sub2-CallTypeC 2
Sub3-CallTypeC 3

- Thanks for any assistance
 
Once you have inserted topN = 3 on group #1, you could then insert a chart in the Group #1 footer. Then create a formula to add to the Group #1 header:

whileprintingrecords;
numbervar cnt := cnt + 1;

Then suppress GF#1 with:

whileprintingrecords;
numbervar cnt;
cnt <> 3

You could use that to suppress other sections as well.

-LB
 
It works perfectly!

Actually i changed "cnt <> 3" to "cnt <> {?Parameter}". I can now randomly chose which one of the TopN to chart.

Thanks for the assistance...greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top