Same value in every row?
Hi,
I have a subreport with 7 DBtext components.
6 of the components connect to table1 and one to table2.
When I run the report the first 6 components create a unique value for each
row but the 7th component always displays the last record of table 2.
This is how I'm connecting them:
//The first 6 fields
ds := TDataSource.Create(Self);
ds.DataSet := m_ReportTable1;
ReportPipeL1 := TppDBPipeline.Create(Self);
ReportPipeL1.Name := 'PipeLine1';
ReportPipeL1.DataSource := ds;
ppReport1.Template.FileName :=
IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName))+'ReportTemplate.rtm';
ppSubReport2.DataPipeline := ReportPipeL1;
ppDBText1.DataPipeline := ReportPipeL1;
ppDBText1.DataField := 'TEGUNDRYMIS';
ppDBText2.DataPipeline := ReportPipeL1;
ppDBText2.DataField := 'UNDIRTEGUND';
ppDBText3.DataPipeline := ReportPipeL1;
ppDBText3.DataField := 'THORF';
ppDBText4.DataPipeline := ReportPipeL1;
ppDBText4.DataField := 'BRYNTHORF';
ppDBText5.DataPipeline := ReportPipeL1;
ppDBText5.DataField := 'MBRYNTHORF';
ppDBText6.DataPipeline := ReportPipeL1;
ppDBText6.DataField := 'SAMTALS';
//Then I connect the 7th component
ds3 := TDataSource.Create(Self);
ds3.DataSet := m_ReportTable3;
ReportPipeL3 := TppDBPipeline.Create(Self);
ReportPipeL3.Name := 'PipeLine3';
ReportPipeL3.DataSource := ds3;
ppDBText17.ParentDataPipeline := False;
ppDBText17.DataPipeline := ReportPipeL3;
ppDBText17.DataField := 'f1';
What am I missing here?
thanks,
Valdimar
P.S.
The components are all set in the same way as the 7th component is a copy
of the 6th one.
I have a subreport with 7 DBtext components.
6 of the components connect to table1 and one to table2.
When I run the report the first 6 components create a unique value for each
row but the 7th component always displays the last record of table 2.
This is how I'm connecting them:
//The first 6 fields
ds := TDataSource.Create(Self);
ds.DataSet := m_ReportTable1;
ReportPipeL1 := TppDBPipeline.Create(Self);
ReportPipeL1.Name := 'PipeLine1';
ReportPipeL1.DataSource := ds;
ppReport1.Template.FileName :=
IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName))+'ReportTemplate.rtm';
ppSubReport2.DataPipeline := ReportPipeL1;
ppDBText1.DataPipeline := ReportPipeL1;
ppDBText1.DataField := 'TEGUNDRYMIS';
ppDBText2.DataPipeline := ReportPipeL1;
ppDBText2.DataField := 'UNDIRTEGUND';
ppDBText3.DataPipeline := ReportPipeL1;
ppDBText3.DataField := 'THORF';
ppDBText4.DataPipeline := ReportPipeL1;
ppDBText4.DataField := 'BRYNTHORF';
ppDBText5.DataPipeline := ReportPipeL1;
ppDBText5.DataField := 'MBRYNTHORF';
ppDBText6.DataPipeline := ReportPipeL1;
ppDBText6.DataField := 'SAMTALS';
//Then I connect the 7th component
ds3 := TDataSource.Create(Self);
ds3.DataSet := m_ReportTable3;
ReportPipeL3 := TppDBPipeline.Create(Self);
ReportPipeL3.Name := 'PipeLine3';
ReportPipeL3.DataSource := ds3;
ppDBText17.ParentDataPipeline := False;
ppDBText17.DataPipeline := ReportPipeL3;
ppDBText17.DataField := 'f1';
What am I missing here?
thanks,
Valdimar
P.S.
The components are all set in the same way as the 7th component is a copy
of the 6th one.
This discussion has been closed.
Comments
A Report in ReportBuilder is only capable of traversing one dataset. If you
would like to traverse your second table for the value of your 7th
component, you will need to use a subreport connected to that dataset.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Everything is working fine now.
Thanks,
Valdimar