Re: Repost
I am reposting this just in case it was missed ...
The following is what I tried next but it was blowing up because the events
that are attached to the report are not present.
ppreport2.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppreport2.Template.LoadFromDatabase;
ppreport1 := ppreport2;
ppreport1.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppreport1.Template.SaveToDatabase;
The following is what I tried next but it was blowing up because the events
that are attached to the report are not present.
ppreport2.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppreport2.Template.LoadFromDatabase;
ppreport1 := ppreport2;
ppreport1.Template.DatabaseSettings.Name := FileListDBName.Strings[i];
ppreport1.Template.SaveToDatabase;
This discussion has been closed.
Comments
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
iDownload := 0;
euDatabase.Connected := True;
euReportsDB.Connected := True;
with qry do
begin
SQLScript := 'delete from rb_item';
SQL.Clear;
SQL.Add(SQLScript);
Prepare;
ExecSQL;
end;
tblItem.Active := True;
tblReportItem.Active := True;
for i := 0 to FileListDBName.Count-1 do
begin
SearchSuccess := tblItem.Locate('NAME',FileListDBName.Strings[i],[]);
if SearchSuccess then
begin
tblReportItem.Insert;
tblReportItemITEM_ID.Value := tblItemITEM_ID.Value;
tblReportItemNAME.Value := FileListDBName.Strings[i];
tblReportItemITEM_TYPE.Value := tblItemITEM_TYPE.Value;
tblReportItemFOLDER_ID.Value := tblItemFOLDER_ID.Value;
tblReportItemITEM_SIZE.Value := tblItemITEM_SIZE.Value;
tblReportItemITEM_TYPE.Value := tblItemITEM_TYPE.Value;
tblReportItemMODIFIED.Value := Time;
tblReportItemTEMPLATE.AsVariant := tblItemTEMPLATE.AsVariant;
tblReportItem.Post;
inc(iDownload);
end;
end;
finally
euReportsDB.Connected := False;
euDatabase.Connected := False;
MessageDlg('Reports Downloaded ( ' + inttostr(iDownload) + ' )',
mtInformation, [mbOK], 0);
end;