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

TppDesigner at run time

edited November 2006 in End User
I created the TppDesigner, TppReport, TppDBPipeline, TDatasource,
TAsaDataSet and TAsaSession at run time in the constructor of a class
therefore I'm releasing the components in the destroy. The report is open
properly in the designer, but after the form is closed I have AV in the
ppDesignerToolManagerTBX unit and after that in the ppUtils unit. It has
something to do with the designer. Because sending the report to the
printer o to the screen works fine. Also i created a Form at run time
also, because if there is no owner for the ppDesigner the AsaSession is
not found.
Any ideas?

Suyin



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited November 2006
    The error is generated at the finalization of the ppclass unit when the
    ppUnRegisterComponent(TppLabel) it is called. It is trying to create the
    components again to the ToolBar, but the ToolBar is nil. :-((




    --- posted by geoForum on http://delphi.newswhat.com
  • edited November 2006

    - when creating the components, use the form/datamodule as the Owner

    example:

    myDesigner := TppDesigner.Create(Self);

    - with the above, you do not need to destroy any of the components, the
    Owner will destroy them.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.