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

if Bookmark-Counter > 0 everything is all right

edited September 2009 in General
Hello, [Delphi7..Reportbuilder 9.3..Zeos..Firebird 2.0..]

i have a small problem ..

i tell the report to print just the bookmarked record and everything works
fine for me..

ppDBPipeline1.ClearBookmarkList;
zquery1.First;
while not zquery1.Eof do
begin

if
AnsiContainsText(zquery1.FieldByName('OBJECT_NAME').AsString,edit1.Text)
then
begin
ppDBPipeline1.SetBookmark;
end;

zquery1.Next;
end;

ppReport1.Print;



but: when no bookmark is set - the report prints ALL records ...
I am searching a solution to tell a REPORT also a SUBREPORT to do nothing,
if there is no bookmark..
[this code ist just a sample, with this art of code- i avoid a lot of SQL
statements...]

Thanx for help

Erich

Comments

  • edited September 2009
    Hi Erich,

    When no bookmark is set, the pipeline will traverse the dataset in its
    entirety by design. Perhaps if the while loop below finishes without
    setting a valid bookmark, you could simply disconnect the pipeline from the
    report before calling Print. This would give you the effect you are after.

    Report.DataPipeline := nil;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.