Home DADE

Problem about save more data pipeline

edited February 2007 in DADE
Hi,
I'm writing an application for design a report in runtime mode and external
to the my print server application.

I create with the class and not the visual component : dataset, datasource,
datapipeline.
I create with visual component report end designer.

I have to create dataset, datasource and datapipeline with the class because
I don't know how many dataset,datasource,
datapipeline I need. I design my report for example with two data pipeline,
assign the first to dbtext1, the second to dbtext2, and save it.When I
reopen my report design i don't see the assignment of second pipeline but i
see only the main pipeline.
this is my code :

var
frm : TFrmDesigner;
rsMam : DbQuery;
rsDs : array of DbQuery;
rsPp : array of TppDbPipeline;

...

function ReportDesigner.loadDataSets() : boolean;
var
i : integer;
begin
i := 0;
rsMam := getCn().openQry(sqlDataSets,[getCprn()]);
rsMam.open;
frm.dsMAM.DataSource := rsMam.getDataSource();
while (rsMam.next()) do
begin
SetLength(rsDs,i + 1);
SetLength(rsPp,i + 1);
// ASSEGNO AD OGNI ELEMENTO DEL VETTORE RS IL CORRISPONDENTE SQLSTMT
rsDs[i] :=
getCn().openQry(StringReplace(upperCase(rsMam.getFieldByName('STMTSQL')),upperCase(':tabella^'),'TMPDESIGNER',[rfReplaceAll]),[]);
rsDs[i].open;
Result := rsDs[i].getError();
if (Result) then
exit;
// ASSEGNO AD OGNI PIPEILINE IL PROPRIO DATASOURCE
rsPp[i] := nil;
rsPp[i] := TppDbPipeline.Create(frm.ppRep.Owner);
rsPp[i].DataSource := rsDs[i].getDataSource();
rsPp[i].UserName := 'dbQuery'+IntToStr(i);
rsPp[i].OpenDataSource := True;
inc(i);
end;
end;

Could You help me?

Thank's,
Mauro

Comments

  • edited February 2007
    Please do not crosspost message. This question has been answered in the
    datapipeline newsgroup.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.