Yet Another Master/Detail Report Problem

edited 3:51PM in FastReport 3.0
Hi, i have a problem that seems pretty common, i have been browsing the web for solutions but I couldent find one i could apply to my problem directly.

I have a delphi 7 form with 2 Tadodataset connections to an access database with the following query commands

master: SELECT TBLCustomerInfo.CustomerID, TBLCustomerInfo.FName, TBLCustomerInfo.SName, TBLCustomerInfo.Address, TBLCustomerInfo.Town, TBLCustomerInfo.PostCode, TBLCustomerInfo.Tel, TBLCustomerInfo.Fax, TBLCustomerInfo.Mobile, TBLCountyInfo.Name
FROM TBLCountryInfo INNER JOIN (TBLCountyInfo INNER JOIN TBLCustomerInfo ON TBLCountyInfo.CountyID = TBLCustomerInfo.CountyID) ON TBLCountryInfo.CountryID = TBLCountyInfo.CountryID ;


detail: SELECT TBLRemoteUnitInfo.SerialNumber, TBLRemoteUnitInfo.TankName, TBLRemoteUnitInfo.TankSize
FROM TBLRemoteUnitInfo where CustomerID = :CustomerID


I then have a datasource for linking the detail to the master for the :customerID parameter to work.

Then I have two TfrxDBDatasets, one linked to the master dataset, one to the detail dataset with a link to the datasource too.

When running a report with master and detail bands, i can only display master records that have detail.

ie

customerID 1
0000-0001
0000-0002
customerID3
0000-0004

instead of

customerID1
0000-0001
0000-0002
customerID2
customerID3
0000-0004


I have spent ages trying to get it to work and have finally given up

Please help

Dan

Comments

  • edited 3:51PM
    Set MasterData.PrintIfDetailEmpty propert to true.
  • edited 3:51PM
    yeah, thats what i call a promt and to the point answer!

    thanks

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.