Master detail problem

I am having a problem with master detail reports that I dont understand - basically they dont work

I have two tables and I have set up a master detail relationship between them such that if i click on an entry in table1 just the linked entries in table 2 are displayed. OK so that bit works fine.

If I add a masterdata band to FR conect to table 1 and place a field on it from table1 and run my report, then I just see the field displayed on each band as I would expect.

I then add a Detaildata band and connect to table 2 and add a field from table 2 to the report. If I now re run the report (or preview) I get a blank report. If I delete the table 2 field (i.e. the detail field has no data on it, I get the same i.e. a blank report

Any ideas?

Comments

  • gpigpi
    edited 10:17PM
    Try to set MasterData.PrintIfDetailEmpty to True. What resuld did you get?
  • Sorry - been away fora few days - but no, no solution yet. Cant get master data to work properly.

    Anyone else having an issue here?
  • edited April 2013
    Sorry GPI - I should have said thanks, but no that made no difference.

    I am making progress - master band now prints, but detail is always empty. (fields in detail table are populated)


    confused
  • Sorry GPI - I should have said thanks, but no that made no difference.

    I am making progress - master band now prints, but detail is always empty. (fields in detail table are populated)


    confused


    Sorted - I had two data sources that connected to the same table, I used one for the master band and the other as my mastersource in the detail table.
  • edited April 2013
    I have the same problem. New Version Fastreport 4.13.1 and XE3 Architect. Masterdetail prints not any information. Same with Detaildata. All other bands are working.

    Generated a new report with the wizard and connected database. I use tfrxdatabase and unidac components with C++ Builder.

    I have made several tests. In some case if masterdetail is not assign a database, then detaildata works. But get my report not workable.
  • edited 10:17PM
    mk_bcb6 wrote: »
    I have the same problem. New Version Fastreport 4.13.1 and XE3 Architect. Masterdetail prints not any information. Same with Detaildata. All other bands are working.

    Generated a new report with the wizard and connected database. I use tfrxdatabase and unidac components with C++ Builder.

    I have made several tests. In some case if masterdetail is not assign a dataset, then detaildata works. But get my report not workable.
    I get it now work. Use more masterbands with one overlay at the report. I must remove all assign datasets from any masterband. At first i had used 2 tfrxdatabase for master- and detailband. Now i use only one tfrxdatabase for masterband, but did not assign to any band. Then put the tfrxunidactable inside frxreport assigned to the detailband and connect with master and masterfields.

    If i print the first time this report then there is no output at the detailband. After that it works. I have solved it by calling PrepareReport at starttime.

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.