Subreport dataset is stuck

Hello,

I have 2 datasets in Delphi:

Master: the names
Client: phone numbers (one person can have many phone numbers).
In Delphi the Client is called properly: when I click on a name I can see the phone numbers associated with that person.

I put on the Fr a Masterdata connected to Master and I made a Subreport on which I put another MasterData connected to the Client.

The report should look like this:

John Smith
1111 11111
Paul Black
2222 2222
3333 3333
Jonathan Fire
4444 4444


Instead, Fr shows this:

John Smith
1111 11111
Paul Black
1111 11111
Jonathan Fire
1111 11111

So obviously it doesn't refresh the Client dataset when creating the next row.
( I must use subreport because my report is much more complicated than the example above).





Comments

  • gpigpi
    edited 7:43AM
    Did you create Master-Detail link between your datasets in Delphi code?
  • edited 7:43AM
    Yes, the Master-Detail link is set - this is what I meant by "In Delphi the Client is called properly: when I click on a name I can see the phone numbers associated with that person."
  • edited 7:43AM
    I know what the problem is (I don't know yet the solution): on the Masterdata I create everything on the fly so the dataset is not set -> this way it doesn't move the main dataset >
  • gpigpi
    edited 7:43AM
    Attach small demo project with problem based on FRDemo database

Leave a Comment