Problem with subreports
Hello Everyone !
I have a "little" problem with subreports in the newest version of FastReport.
I'm trying to do a report containing one subreport.
For main report I was written ADOQuery1 like this : "select id, field1 from table1"
Field "field1" is placed in MasterData1.
Next, I created subreport with ADOQuery2 : "select id, id_sub, field2 from table2 where id_sub=:id_sub". Parameter :id_sub is linked to field id from ADOQUERY1
Subreport is placed in MasterData1 on maim raport page.
I created 2 example tables :
table 1 :
id field1
1 t1
2 t2
table 2 :
id id_sub field 2
1 1 r1
2 1 r2
3 2 i1
4 2 i2
I was expect, that the result should be something like this :
t1 r1
r2
t2 i1
i2
But I gained :
t1 r1
r2
t2 r1
r2
Any suggestion what I'm doing wrong ?
Best Regards
TK
I have a "little" problem with subreports in the newest version of FastReport.
I'm trying to do a report containing one subreport.
For main report I was written ADOQuery1 like this : "select id, field1 from table1"
Field "field1" is placed in MasterData1.
Next, I created subreport with ADOQuery2 : "select id, id_sub, field2 from table2 where id_sub=:id_sub". Parameter :id_sub is linked to field id from ADOQUERY1
Subreport is placed in MasterData1 on maim raport page.
I created 2 example tables :
table 1 :
id field1
1 t1
2 t2
table 2 :
id id_sub field 2
1 1 r1
2 1 r2
3 2 i1
4 2 i2
I was expect, that the result should be something like this :
t1 r1
r2
t2 i1
i2
But I gained :
t1 r1
r2
t2 r1
r2
Any suggestion what I'm doing wrong ?
Best Regards
TK
Comments
Where MasterData1 assigned to TADOQuery1.
Mick
That is exactly what I need !!!
Thank You very much !
best regards
TK