Data dictionary on report print
Delphi 6, RB Enterprise 10.06
I've got a form with a ppReport, ppDesigner and ppDataDictionary. The
ppDesigner.DataSettings.DataDictionary is assigned to the ppDataDictionary
component and the ppDesigner.DataSettings.UseDataDictionary property is set
to True.
This works as expected, my designer shows only the tables and fields set up
in my data dictionary. I don't have a problem with that.
However, when I come to simply call ppReport.Print, the data dictionary
pipelines and datasets are opened. Why? This has nothing to do with the
designer at this stage, and given the size of our database, is causing a 20
second delay before the report prints.
I have put code in the AfterOpen events on my dictionary tables and
pipelines to prove this is the case.
Setting ppDesigner.DataSettings.UseDataDictionary := False rectifies the
issue but why should I have to even alter this property when all I am doing
is calling the Print method of a TppReport component?
--
Jason Sweby
Software Development Manager,
Carval Computing Limited, Plymouth, UK
Payroll - HR - T&A - Access Control
I've got a form with a ppReport, ppDesigner and ppDataDictionary. The
ppDesigner.DataSettings.DataDictionary is assigned to the ppDataDictionary
component and the ppDesigner.DataSettings.UseDataDictionary property is set
to True.
This works as expected, my designer shows only the tables and fields set up
in my data dictionary. I don't have a problem with that.
However, when I come to simply call ppReport.Print, the data dictionary
pipelines and datasets are opened. Why? This has nothing to do with the
designer at this stage, and given the size of our database, is causing a 20
second delay before the report prints.
I have put code in the AfterOpen events on my dictionary tables and
pipelines to prove this is the case.
Setting ppDesigner.DataSettings.UseDataDictionary := False rectifies the
issue but why should I have to even alter this property when all I am doing
is calling the Print method of a TppReport component?
--
Jason Sweby
Software Development Manager,
Carval Computing Limited, Plymouth, UK
Payroll - HR - T&A - Access Control
This discussion has been closed.
Comments
Thanks for pointing this out. Will will take a look at possibly enhancing
this behavior for a later release of ReportBuilder. Currently you will need
to use the work-around you discovered of disconnecting the DataDictionary
before printing the report if you do not want the pipelines accessed.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
For anyone else who needs to use this workaround, you need to turn the
DataDictionary off BEFORE you load the report template, not just before
calling Report.Print. I put it in a try..finally block so that the
DataDictionary is always turned back on again after the report has finished.
e.g.
ppDesigner1.DataSettings.UseDataDictionary := False;
try
load and print report here...
finally
ppDesigner1.DataSettings.UseDataDictionary := True;
end;
Jason.