Using SQL Server 7.0 and CRv 8.5
My report is grouped by a product Number (i.e. the left 4 characters of [SalesUSA].item). I want the sort order as a parameter field. My problem, as far as I can tell, is the two fields I want to sort on are summary fields.
Creating the formula field below I get: “A number is required here” and the cursor points to my summary field Sum( {... } )
If {?SortField} = "UnitsSold" Then
formula = Sum ({SalesUSA.OrderQuantity}, {@Left4OfItem})
Else
If {?SortField} = "GrossRevenue" Then
formula = Sum ({@SalesUSA.pric*SalesUSA. OrderQuantity}, {@Left4OfItem})
I wanted to place this formula field in the Top N/ Sort Group Expert.
Can I sort on a summary field?
Is there a work around?
Thanks in advance for any suggestions,
Mike
My report is grouped by a product Number (i.e. the left 4 characters of [SalesUSA].item). I want the sort order as a parameter field. My problem, as far as I can tell, is the two fields I want to sort on are summary fields.
Creating the formula field below I get: “A number is required here” and the cursor points to my summary field Sum( {... } )
If {?SortField} = "UnitsSold" Then
formula = Sum ({SalesUSA.OrderQuantity}, {@Left4OfItem})
Else
If {?SortField} = "GrossRevenue" Then
formula = Sum ({@SalesUSA.pric*SalesUSA. OrderQuantity}, {@Left4OfItem})
I wanted to place this formula field in the Top N/ Sort Group Expert.
Can I sort on a summary field?
Is there a work around?
Thanks in advance for any suggestions,
Mike