The new TfrxReport.EnabledDatasets property

Currently available FR 3.0 build and CBuilder 5.

I have not been able to find the new TfrxReport.EnabledDatasets property in the current distribution of FR 3.

The changes.txt indicates that this is version 3.01 however designer still says FR 3.0.

I am assuming that this property is to address the problems of referencing valid datasets in non data linked bands like Page Header and Report Title etc.

The inability to do this is a real show stopper for me.


Comments

  • edited September 2004
    This property limites the number of datasets available to a report.
    To solve non-databands problem, fix the
    frxDBSet.pas:
    function TfrxDBDataset.GetDisplayText(Index: String): String;
    var
      i: Integer;
    begin
      if not FInitialized then
        Initialize1;
      if DataSetActive then
        if Fields.Count = 0 then
          Result := FDS.FieldByName(Index).DisplayText
        else
        begin
          i := Fields.IndexOf(Index);
          if i <> -1 then
            Result := TField(Fields.Objects[i]).DisplayText
          else
          begin
            Result := frxResources.Get('dbFldNotFound') + ' ' + UserName + '."'
    +
              Index + '"';
            ReportRef.Errors.Add(ReportRef.CurObject + ': ' + Result);
          end;
        end
      else
        Result := UserName + '."' + Index + '"';
    end;
    
    function TfrxDBDataset.GetValue(Index: String): Variant;
    var
      i: Integer;
    begin
      if not FInitialized then
        Initialize1;
      i := Fields.IndexOf(Index);
      if i <> -1 then
        Result := TField(Fields.Objects[i]).Value
      else
      begin
        Result := Null;
        ReportRef.Errors.Add(ReportRef.CurObject + ': ' +
          frxResources.Get('dbFldNotFound') + ' ' + UserName + '."' + Index +
    '"');
      end;
    end;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.