I can't get my report to sort based on calculated fields.
Here's the SQL that the report is linked to.
SELECT [Team Data].[Team Points], [Team Data].[Opp Points], [team points]+[opp points] AS GameTot
FROM [Team Data];
The report has 3 text box controls in the group header. [GameTot] which has the select query as its control source. Then there are 2 calculated controls named [games] and [pct]. The formula in [games] is Count(*) and the formula in [pct] is =[games]/[TotGames]. [TotGames] is a calculated control in the report footer and contains the formula Count(*). I want to be able to sort by the calculated control [pct].Placing [pct] in the sorting and grouping box justs brings up a dialog box that asks for the parameter value of [pct]. Can anyone tell me how to make this sort by the [pct] field. Does it have something to do with I'm trying to sort by an aggregate function ? Any help would be appreciated. Thanks !
Here's the SQL that the report is linked to.
SELECT [Team Data].[Team Points], [Team Data].[Opp Points], [team points]+[opp points] AS GameTot
FROM [Team Data];
The report has 3 text box controls in the group header. [GameTot] which has the select query as its control source. Then there are 2 calculated controls named [games] and [pct]. The formula in [games] is Count(*) and the formula in [pct] is =[games]/[TotGames]. [TotGames] is a calculated control in the report footer and contains the formula Count(*). I want to be able to sort by the calculated control [pct].Placing [pct] in the sorting and grouping box justs brings up a dialog box that asks for the parameter value of [pct]. Can anyone tell me how to make this sort by the [pct] field. Does it have something to do with I'm trying to sort by an aggregate function ? Any help would be appreciated. Thanks !