Master Detail Detail Report

I am using FastReports V2.5 Trial in Delphi 6, and am having some problems with a Master-Detail-Detail report. I have linked the two detail database tables to the master using a DataSource component, and the master link on the tables.

When the report is generated the first detail section displays correctly.
The second detail section has the correct number of rows taken from the second detail table, however the data is always the same as the last row from the first detail section. If the first detail section has no data then the rows are blank.

The second database appears to be linked correctly as the correct number of rows are being returned.


Anyone any ideas?



I have emailed the support@fast-report.com email address, but have not heard anything for over two weeks now.

Tim.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:44PM
    Hi Chuckie
    the problem usually lies in connecting the frdbdataset's datasource or dataset property to the wrong object. If your pointing it to a data source component
    try pointing it to the table instead. only for the detail objects.
    regards
    gord
  • edited 3:44PM
    Gordk,

    I have three frDBDataSets, Master, Detail1 and Detail2, each of which is connected using the dataset property to one of three tables. I have a DataSource on the form. The two detail tables are linked to the datasource through there MasterSource property, the DataSource is connected to the master table through its dataset propert. The detail tables have their IndexFieldNames and MasterFields properties set to reference fields in the databases.


    A sample output of the problem can be found here:
    http://www.duckdensity.org.uk/fastreports/fastreports.pdf


    I have placed my test project on the web at the following locations, with and without the generated EXE file. If you get chance to look at it maybe you can find my mistake. The project is set up as described above.

    Project without the generated EXE file (16Kb)
    http://www.duckdensity.org.uk/fastreports/...etailDetail.zip

    Project with the generated EXE file (0.99Mb)
    http://www.duckdensity.org.uk/fastreports/...ilDetailExe.zip

    The project was created with Delphi 6, FR 2.5 Trial, and uses the DBISAM database engine, http://www.elevatesoft.com/prodinfo.htm



    Tim.
  • edited 3:44PM
    I have regnerated the demo project using paradox tables natvie to delphi, rather than the DBISam. I should make it easier for you to view to see if you can find my mistake.

    I have tried installing the new version of fast reports v2.51, still the trial version. With the new version the same problem is still present.


    With the generated exe file (808K)
    http://www.duckdensity.org.uk/fastreports/...DE_with_exe.zip


    Without the generated exe file (15K)
    http://www.duckdensity.org.uk/fastreports/...without_exe.zip
  • gordkgordk St.Catherines On. Canada.
    edited 3:44PM
    chuck
    delphi data module or form with tbls datasources etc.
    mastertbl - tdatasource1- dataset prop mastertbl
    detailtbl1 - msource prop set to tdatasource1 + approp index
    detailtbl2 - msource prop set to tdatasource1 + approp index

    frdbdatasets
    master - datasource prop set to tdatasource1
    detail1 - dataset prop set to detailtbl1
    detail2 - dataset prop set to detailtbl2

    here is a sample of connections
    regards
    gord ;)
  • edited 3:44PM
    The only difference between your suggestted setup and mine, is that I had linked the master frdbDataSet to the MasterTable, and not the DataSource. Changing this has had no effect on the generated output.

    Is there any problem with linking on the same field/index? My two detail tables are identical in structure and link on the same field to the Master.

    The tables contain two different sets of data which need to be displayed with a header above each set. Keeping them in seperate tables makes the headers easier.

    Tim.
  • gordkgordk St.Catherines On. Canada.
    edited 3:44PM
    Hi Chuck
    your tables are connected fine.
    your bands are ok
    look at what you have put in each memo in each band. ;)
    and put in the correct datafield references.
    ie
    memo in masterdataband should be
    [mastertablename."timestamp"]
    memo in detail1 should be
    [detailtable1name."Timestamp"]
    and so on.
    easiest way
    select desired memo dblclick brings up editor select datafield then in dialog select
    correct dataset and in field window select correct field

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.