How access pipeline from loaded report ?
I load report from database and I need access dataset for one table. How
can do this ?
I try TppDataPipelineList.Create(Report_Sys) but It return only one
pipeline and if I try to set filter is ignored in the report execution.
Sample code
-------------
Report_Sys.Template.LoadFromDatabase;
PipeLineList := TppDataPipelineList.Create(Report_Sys);
--
Philippe Constant
CTRL/Informatique
350 Rue Franquet, bureau 50
Ste-Foy, Qc
G1P 4P3
can do this ?
I try TppDataPipelineList.Create(Report_Sys) but It return only one
pipeline and if I try to set filter is ignored in the report execution.
Sample code
-------------
Report_Sys.Template.LoadFromDatabase;
PipeLineList := TppDataPipelineList.Create(Report_Sys);
--
Philippe Constant
CTRL/Informatique
350 Rue Franquet, bureau 50
Ste-Foy, Qc
G1P 4P3
This discussion has been closed.
Comments
[Report[DataModule[DataView[DataPipeline]]]]
So you need to extract the DataModule first. There is a DADE function that
does this:
uses
daDataModule, daDataView, daDB;
procedure TForm1.GetDataPipelinesOutOfDataModule;
var
lDataModule: TdaDataModule;
lDataView: TdaDataView;
lDataPipeline: TppDataPipeline;
liIndex: Integer;
lDataPipelines: TList;
begin
lDataPipelines := TList.Create;
{get the datamodule}
lDataModule := daGetDataModule(aReport);
if (lDataModule <> nil) then
begin
for liIndex := 0 to lDataModule.DataViewCount - 1 do
begin
lDataView := lDataModule.DataViews[liIndex];
lDataPipeline := lDataViews.DataPipelines[0];
lDataPipelines.Add(lDataPipeline);
end;
end;
{do something interesting with lDataPipelines here}
end;
Once you have the data module, you can loop through it's DataView array
property and retrieve the DataViews. QueryDataViews (which are created by
the Query Designer and Query Wizard) have only one data pipeline, so you can
easily retrieve this from the first position of the DataPipelines array
property.
--
Cheers,
Tom Ollar
Digital Metaphors Corporation
http://www.digital-metaphors.com
info@digital-metaphors.com