master-detail, master ok ,detail not :(

Hi
i have a master detail report in delphi 7

master data belongs to frdbdataset1 and frdbdataset 1 has datasource1, datasource1 has dataset query1

detail data belongs to frdbdataset2 and frdbdataset 2 has datasource2, datasource2 has dataset query2


masterdata query's sql is : select * from table1

(table1 fields : productcode, date, time, etc..)

everythings is ok with master data, it shows all products in its seperate master row
and + its detail data


i tried these queries for detail data but i could achive.

select * from table2 where productcode =table1.productcode
select * from table2 where productcode =:table1.productcode
select * from table2 where productcode :=table1.productcode
;)

it raised error , field not found or empty data

when i tried this
select * from table2 where productcode =1234

result was ok

master data row 1 example cheese
detail data -> rows which have productcode 1234

master data row 2 example honey
detail data -> rows which have productcode 1234

but of course this doesnt solve my problem cuz i need detail of every prodcut under its master data.


how can i connect detail data rows related with its master data row in every record?

thanks in advance

Calik.


Comments

  • edited 2:43AM
    i solved the problem, i fixed datasource settings
    i set frbddataset datasource to datasource1 everything ok now
    calik

Leave a Comment