disabling data-aware components, keeping master/details
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
tables?
Thanks for your help,
Bill
they are not flashing updated data as the print progresses) without
disabling the master/detail relationships that exist between master/detail
tables?
Thanks for your help,
Bill
This discussion has been closed.
Comments
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.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
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?
Bill
this:
------
Get the bookmark
SendMessage(MyForm.Handle, WM_SETREDRAW, Ord(False), 0);
Print;
SendMessage(MyForm.Handle, WM_SETREDRAW, Ord(True), 0);
Go to the bookmark
MyForm.Repaint;
------
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
Programmeur,
Conception Design Ware Inc.
Tél.: 819-868-8853
Fax : 819-868-8855