Home Datapipelines

disabling data-aware components, keeping master/details

edited September 2002 in Datapipelines
What is the best way to disable data-aware controls during printing (so that
they are not flashing updated data as the print progresses) without
disabling the master/detail relationships that exist between master/detail

Thanks for your help,


  • edited September 2002
    You have a two pass report and you want to not have the controls update
    themselves on the first page until the first pass is completed. If you want
    to disable a control in the report, the easiest way to do this is to set it
    to Visible = false in the band's BeforePrint event. Since the data
    pipelines are still connected with data, the report will traverse all the
    master and detail records. In the Report.OnEndSecondPass you can set the
    controls to Visible = true.


    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Thanks for your prompt reply Jim.

    I was not clear about the controls. This is a one-pass report. The
    controls are on the Delphi form. As the print dialog displays over the
    form, the controls on the form are flashing data as the report transverses
    the data. If I table.disablecontrols, then I lose the master/detail
    relationships in the datasets and thus in the pipeline as well.

    What effect does the master/detail definition in the pipeline have. What if
    I defined those and disabled the dataset controls? Would the report still
    have the master/detail relations active?


  • edited September 2002
    A quick fix I did was to disable the redraw of the form. It goes a little like

    Get the bookmark
    SendMessage(MyForm.Handle, WM_SETREDRAW, Ord(False), 0);
    SendMessage(MyForm.Handle, WM_SETREDRAW, Ord(True), 0);
    Go to the bookmark

    The down side to this is that the printing must not take too much time because
    users can be affraid by a form that won't redraw.

    Don't forget to make the dataset to it's original record because the printing
    will put the query at the end of the records.

    Daniel Lemire
    Conception Design Ware Inc.
    Tél.: 819-868-8853
    Fax : 819-868-8855
This discussion has been closed.