Linked Subreport Woes.
I am currently building an Export Engine utilising the Report Builder
component to preview and desing etc. My problem is with linked subreports.
Because of the nature of my exporter, nothing is known until runtime so I am
having to build everything at runtime, data sources included, as I never
know how many subreports, if any there are going to be. So everything is all
well and good until I come to display linked subreports. Here is the code I
am using for establishing the link between the Report + SubReport:-
{ Set up the Master Pipeline Link... }
TDReportDescriptor(Report).Pipeline.MasterDataPipeline:=TDReportDescriptor(P
arent).Pipeline;
{ create a new field link }
FieldLink := TppMasterFieldLink.Create(nil);
{ And Assign the Field Mappings }
FieldLink.DetailFieldName := Report.DAOInfo.DetailLink;
FieldLink.MasterFieldName := Report.DAOInfo.MasterLink;
{ Assign it to the Parent }
FieldLink.Parent := TDReportDescriptor(Report).Pipeline;
And that is it. If I create a non linked report everything is fine. Upon
previewing the report I see my Main report with all of the data contained
within the subreport, as I would expect. However when I link the data as
above I see all of the data from the main report and no items from the
subreports as I would expect to see. I suspect that this may have something
to do with this linkage but I do not understand what as quite obviously the
pipelines themselves have been proven to be working ok.
Any ideas anyone.....
--
Regards
Conrad Rowlands
Callards Technology Ltd
component to preview and desing etc. My problem is with linked subreports.
Because of the nature of my exporter, nothing is known until runtime so I am
having to build everything at runtime, data sources included, as I never
know how many subreports, if any there are going to be. So everything is all
well and good until I come to display linked subreports. Here is the code I
am using for establishing the link between the Report + SubReport:-
{ Set up the Master Pipeline Link... }
TDReportDescriptor(Report).Pipeline.MasterDataPipeline:=TDReportDescriptor(P
arent).Pipeline;
{ create a new field link }
FieldLink := TppMasterFieldLink.Create(nil);
{ And Assign the Field Mappings }
FieldLink.DetailFieldName := Report.DAOInfo.DetailLink;
FieldLink.MasterFieldName := Report.DAOInfo.MasterLink;
{ Assign it to the Parent }
FieldLink.Parent := TDReportDescriptor(Report).Pipeline;
And that is it. If I create a non linked report everything is fine. Upon
previewing the report I see my Main report with all of the data contained
within the subreport, as I would expect. However when I link the data as
above I see all of the data from the main report and no items from the
subreports as I would expect to see. I suspect that this may have something
to do with this linkage but I do not understand what as quite obviously the
pipelines themselves have been proven to be working ok.
Any ideas anyone.....
--
Regards
Conrad Rowlands
Callards Technology Ltd
This discussion has been closed.
Comments
goes to show that you do get the answers from newsgroups!
--
Regards
Conrad Rowlands
Callards Technology Ltd