Field aliases in Data Dictionary doesn't work
I'm trying to create a procedure that will register datasets (only that I need) with friendly field names (IBO has that in fields.DisplayName) in FR's Data Dictionary in field aliases but it doesn't work nor programatically nor manually (FR doesn't save hidden fields and aliases). Here's how I do it in my procedure:
procedure TForm1.FrRegisterDataSet(ds:TIB_DataSet; dsalias:string);
var i: integer;
begin
frReport1.Dictionary.FieldAliases.Variable[ds.Name] := dsalias;
for i := 0 to ds.FieldCount-1 do
begin
if ds.Fields.Visible then // i need only fields that are set as visible in ib_query
frReport1.Dictionary.FieldAliases.Variable[ ds.Name+'."'+ds.Fields[i].FieldName+'"'] := ds.Fields.DisplayName;
end;
end;
Help please...
SORRRY! I solved problem - removed quotas in procedure and recompiled FR
procedure TForm1.FrRegisterDataSet(ds:TIB_DataSet; dsalias:string);
var i: integer;
begin
frReport1.Dictionary.FieldAliases.Variable[ds.Name] := dsalias;
for i := 0 to ds.FieldCount-1 do
begin
if ds.Fields.Visible then // i need only fields that are set as visible in ib_query
frReport1.Dictionary.FieldAliases.Variable[ ds.Name+'."'+ds.Fields[i].FieldName+'"'] := ds.Fields.DisplayName;
end;
end;
Help please...
SORRRY! I solved problem - removed quotas in procedure and recompiled FR