Report designer in mdi child mode

ccyccy
edited 3:58PM in FastReport 4.0
Hi,

The changes in Fast Report 4 states that the Report Designer able to in non-modal mode, mdi child mode.

However, I found this changes is uesless and serve no purpose. If we create more than one instance of report designer. The Fast report will prompt access violation. Is this a bug or we can't work on more than one designer at the same time in the same process?

Comments

  • edited 3:58PM
    You can run only one instance of FastReport designer. It's by design.
  • ccyccy
    edited 3:58PM
    Will this behavior be enhanced in next version? It doesn't seems a good design in term of OO. I can create more than one instance of designer in Report Builder and it works fine.

    Another problem I found out is we can't open 2 preview windows at the same time in Fast Report. Is this the same problem too?
  • edited 3:58PM
    This is impossible now due to docking behavior.
    Regarding preview: one TfrxReport can open one preview window. If you need 2 - use 2 TfrxReport.
  • ccyccy
    edited November 2006
    Even if each TfrxReport may open a preview window. But it will cause problem in some unexpected situation due to the DatasetList found in the following procedure in unit frxClass:
    function frxFindDataSet(DataSet: TfrxDataSet; const Name: String;
      Owner: TComponent): TfrxDataSet;
    var
      i: Integer;
      ds: TfrxDataSet;
    begin
      Result := DataSet;
      if Name = '' then
      begin
        Result := nil;
        Exit;
      end;
      if Owner = nil then Exit;
      DatasetList.Lock;
      for i := 0 to DatasetList.Count - 1 do
      begin
        ds := DatasetList[i];
        if AnsiCompareText(ds.UserName, Name) = 0 then
          if not ((Owner is TfrxReport) and (ds.Owner is TfrxReport) and
            (ds.Owner <> Owner)) then
          begin
            Result := DatasetList[i];
            break;
          end;
      end;
      DatasetList.Unlock;
    end;
    

    If we have multi instance of TfrxReport but those DataSet store in DataSetList has same UserName, the report output won't get display correctly. I am not sure you able to figure out what's wrong with this singleton design. If you don't, I will provide an example to illustrate this.

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.