MDI DataSets mess

edited 11:46AM in FastReport 3.0
Help!

I have an MDI style application. MDI windows are opened containing an frxReport each. MasterDataset is designtime TfrxDataSet derived component and Details are created dynamically. When upgrading I had to change the order of report loading and dataset creation from FR2.5 to make FR3 "see" the datasets. OK.

Problem is the frxReport in the second MDI can "see" the datasets from the first MDI. I have tried to work with frxReport.DataSets.Add() to no avial. I have tried to use the frxReport as owner for frxDataSets to no avail.

How do I make it so that the report only sees and uses datasets from the same parent? Having different usernames does not help.

I think that in FR2.5 I used Dictionary where I could say only to display datasets with names starting with "MDIChild1*" that was OK for up to 10 MDI Child windows, but that might have had only to do with TDataSet decendants.

Thanks a lot!

/Dany

BTW;

My previous post "Where did OnProgress go?" has not been noticed yet!

Also, a more specific list of "Bug fixes" when you release a new 3.0x version would be nice.

Comments

  • edited 11:46AM
    Use TfrxReport.EnabledDataSets property. Only datasets added to this list will be visible in the report.
  • edited 11:46AM
    Alex, thanks!!! I'll try it as soon as I can and confirm here.

    Anything about the note below my signature ;) ??

    /Dany
  • edited October 2004
    Alex!

    Sorry. This does not help!

    If I open the report in the second MDI in the designer I have to re-check used datasets. The list in the dialog is ok, but the data tree shows sequentially originally checked datasets.

    The it looks like it works (the report now both work as the first and second opened MDI but when more MDIs are opened prior it fails again. Now with another error message.

    I've compared XML report files and there's no differende between them except GroupIndex (update to 3.03) and PropData fields.

    Understand that dataset have the same names but not (might not have) the same usernames. TfrxReport and TfrxDataSets that are used in the EnabledDataSets.Add operation all have the same MDI Child as parent/owner. The number of dataset vary between MDIs.

    This is becoming a very pressing matter.

    Thanks a lot,

    /Dany

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.