I'm migrating an old application (D5) that uses QuickReport to XE7 and FastReports. So far FastReports is really excellent, but I wanted to pick the hivemind's brain for the best approach to replicating existing functionality.

I'm migrating an old application (D5) that uses QuickReport to XE7 and FastReports.  So far FastReports is really excellent, but I wanted to pick the hivemind's brain for the best approach to replicating existing functionality.

One report needs to crossreference data from two datasets.  The first  is a TMemDataSet (JEDI) containing temp data.  The other is a permanent table on a server (SQL).  The two tables do not have a master/detail relationship predefined.  I want to list records from the MemDataSet along with a few fields from the SQL table, for comparison's sake.

The QuickReport I am replacing used direct TDataSet.FindKey() lookup calls in the BeforePrint() event for the band, and populated QRLabels in the band.  This feels wrong/dirty and does not appear to be easily replicated in FastReport.

I can temporarily establish a master/detail relationship between the tables, and Master/Detail bands on the FastReport to print proper values, but I wanted to check in before I spent any effort on it in case there is a simple, more obvious , or better still "right" solution to what I am trying to do.

Thanks in advance to any who can offer suggestions.

NOTE: These tables are from different DBMS's so I can't just join them in a query or something simple like that...

Comments

  1. FastReport will handle master-detail relationship even for non-TDataSet. From latest version also sorting. In this way you can have different master-details or sorting into the same report (without need to use scripting to call your procedures to couple, decouple and sort your datasets).

    P.S. I need to check this in the office (in two hours). I think I called my custom functions for this. I have not touched this part for years.

    ReplyDelete
  2. I was wrong. Master-detail must be handled from you code. We have reports with different master-detail relationship ,sorting and filtering but I've made three custom functions that we can call from FR script. One for master-detail, one for sorting, and one for filtering.
    We have a service department for report designing and there are many years I have not touched this part.
    Now in FR5 there is a sorting property for bands but master-detail is not handled by FR.

    ReplyDelete
  3. There's an article in the Blaise Magazine (Issue 37/38) on this that might be of interest to you.  "Migration to FastReport: How easy can it be ?" 
    http://www.blaisepascal.eu/

    ReplyDelete

Post a Comment