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

Fixed & Variable Select options

Status
Not open for further replies.

brendanj68

IS-IT--Management
Oct 1, 2003
41
0
0
GB
Hi, am running CR v9 and SQL 2000.

A report change has been requested which I'm uncertain is possible but I have to try and look into it. The up-shot is that the report has a user defined sort option (which works well and sorts data at a top level), but now I need to try and introduce two levels of sorting. The report structure is as follows:

RH - <data>
PH - <data>
GH1 - {@Sort Choice} - Suppressed
GH2 - opportunity_id - Suppressed
GH3 - Company_Name - Suppressed
GH4 - Create_Date - Suppressed
GH5 - Status - Suppressed
GH6 - Region - Suppressed
D - Suppressed
GF6 - Suppressed
GF5 - Suppressed
GF4 - Suppressed
GF3 - Suppressed
GF2 - <data>
GF1 - Suppressed

What the user wants is that Company_Name is always sorted alphabetically, while maintaining a choice within {@Sort Choice} which is

if {?Sort Choice} = 'By Region' then {MIS_Opportunity_Personnel_PS.LA_Region} else
if {?Sort Choice} = 'By Status' then {MIS_Opportunity_Personnel_PS.Status} else
if {?Sort Choice} = 'By Client Name' then {MIS_Opportunity_Personnel_PS.Company_Name} else
if {?Sort Choice} = 'By Date' then ToText ({MIS_Opportunity_Personnel_PS.Rn_Create_Date}, &quot;yyyy-MM-dd&quot;) else
{MIS_Opportunity_Personnel_PS.LA_Region}

Is it possible to force the first sort while maintaing a second 'option'? If you can help this would be a real bonus. Thanks in advance
 
The way you have defined the problem should work. Is this working or have you not tried to implement this?

The only other confusion is that you are calling the Company_Name sort the first sort, while in your example it will be the third sort, with @SortChoice being the first sort. If you want the Company_Name to be the first sort, that group should be moved to be Group 1.
 
Hi,

Tried juggling around the Grouping order with Company_Name (1st sort) and {@Sort Choice} (2nd) Unfortunately this over rules {@Sort Choice} therefore the report always shows Company_Name alphabetically irrespective of the choice made in {@Sort Choice} - which has no affect on how the data is being presented anymore. So to clarify is it possible to mantain Company_Name alphabetically while introducing a second sort which would act as a kind of level 2 sorting option?

Thanks

B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top