No, DADE expects a field to be used as the GROUP BY. There is no support for the expression type group by. If you want to add a GROUP BY in code, then use:
procedure TForm1.CreateGroupBy; var lSQL: TdaSQL; liIndex: Integer; begin
{get SQL object} GetSQLObject(ppReport1, lSQL);
lSQL.ClearGroupByFields;
for liIndex := 0 to lSQL.SelectFieldCount - 1 do lSQL.AddGroupByField(lSQL.SelectFields[liIndex]);
end;
If you want to use an expression, the you'll have to modify the SQLText. Set TdaSQL.EditSQLAsText = True, then you can modify the TdaSQL.SQLText property.
Comments
the expression type group by. If you want to add a GROUP BY in code, then
use:
procedure TForm1.CreateGroupBy;
var
lSQL: TdaSQL;
liIndex: Integer;
begin
{get SQL object}
GetSQLObject(ppReport1, lSQL);
lSQL.ClearGroupByFields;
for liIndex := 0 to lSQL.SelectFieldCount - 1 do
lSQL.AddGroupByField(lSQL.SelectFields[liIndex]);
end;
If you want to use an expression, the you'll have to modify the SQLText.
Set TdaSQL.EditSQLAsText = True, then you can modify the TdaSQL.SQLText
property.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com