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!

Help with ranking problem 1

Status
Not open for further replies.
Sep 12, 2005
448
US
Hi Folks
cr 9.0
ms sql
i have this report
i need to rank base on YTD sales
i have 1 group call territory
here is what it look like
-------------------------------------------------------
gr1
Territory--Week_SLS--MTD_SLS--YTD_SLS--WEEK RNK--YTD_RNK
PFS-01*******900*****10000******5000******1
PFS-04*******500******900*******7000******2
----------------------------------------------------------
i used the group sort expert on my group 1
for this group sort all base on sum of @WEEK_SLS descending
and place the group number special field to get my week rnk
now i need to rnk the YTD sale
How can i do this?
Can i create a manual rnk??????????
never done this before.
so please if you can show me how to
thanks


Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
So which do you want, a ranking by weekly sales or YTD sales? Or maybe a parameter to ask how to rank that particular report?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Hi dgillz
thanks for the reply
they want both rank on the report and now there asking
for an extra rank
base on YTD SLS per rep Rank
this is getting complicated

thanks



Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
I think you will have to add a subreport for each additional rank. The subreport would have the same grouping, but you would use the group sort based on the new field to be ranked. Then you can use groupnumber in the subreport to provide the rank. The key thing is that you can't link on the group field. Instead, you have to create a shared variable in the main report based on the territory field and use that in the subreport to suppress all but the current group, using a formula like:

whileprintingrecords;
shared stringvar terr;
{table.territory} <> terr

This means the subreport must be in a group_b section, with group_a formatted to "underlay following sections".

-LB
 
Hi -LB
Ok so i create the same report as the main and call it
sub_YTD
so my first step is to create a share variable in the main report
is that a formula??? never used share variable before

How do i create a share variable on the main report

and in my sub report must i create one also and link them

sorry for the confusion, i'm getting to old i guess lol lol

i place the content of the main report in the gr1 footer
ok here is the name of my gr 1 in my main report
Terr1_List.Description -A
i will add my sub_YTD in gr footer b??????????
This is my last project them i retired. since my surgery my brains are slow lol lol

thanks a million






Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
Main report shared variable to be placed in the group footer_a section and suppressed:

whileprintingrecords;
shared stringvar terr := {Terr1_List.Description -A};

Do not link the subreport. Place it in GF_b. Then use the shared variable for section suppression in the subreport as I suggested earlier.

-LB
 
Thanks -LB
You make my day
if you ever come to ct will by u lunch anytime :)

Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
Hi -LB
i done what you said and i'm getting prompt for my main and sub report parameter
in my main report i have these parameters
{?End_Date},{?Compensation},{?Dealer},{?channel}
in my sub report i have the same parameters

i place the shared var as you requested and works fine
but when user select the main parameters
there prompt to enter the sub report parameters
is there a way to not have the sub report parameters prompt.

thanks



Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
In the main report, go into the subreport linking screen and link the main report parameters to the subreport parameters (not to fields). Use the dropdown in the lower left to select the actual parameters from the subreport, not those that have the {?pm-} prefix. The parameters in the subs must be named the same as the main report parameters, and be of the same datatype.

-LB
 
thanks -LB works fine
your the girl :)

Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top