Home General

How to filter records at run time?

edited September 2001 in General
Hi,
Using RB6, Delphi6, MS-SQL
Could i filter records via TppReporter dynamically at run time? I wrote
the following codes:

procedure TReportForm.ppDetailBand1BeforePrint(Sender: TObject);
begin
ppDetailBand1.Visible:=(tblMach.AsString=pmach)
end;

It resulted an incorrect record sets!. (Usually It would lose some or all
records)

Comments

  • edited September 2001
    Use the AutoSearch feature. There are some demos in your installation of
    ..\RBuilder\Demo\Autosearch
    For best results, you will want to change the dataset before running the
    report, not while the report is running.
    See the help file for more specific information on using search criteria, as
    they can be entered via a dialog, or used behind the scenes programatically
    without a dialog, in order to filter the data.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.