Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Re: Repost

edited November 2003 in General
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;

Comments

  • edited November 2003
    The question was answered in an earlier post.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2003
    Thanks for all your advice and useful help! ;)

    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;
This discussion has been closed.