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

Data dictionary on report print

edited July 2007 in General
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

Comments

  • edited July 2007
    Hi Jason,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2007
    Nico, Thanks.

    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.

This discussion has been closed.