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

Report Wizard Dialog

edited May 2005 in End User
hi,
I am new to report builder, and i was wondering if i can do and how to,
change the dialog for the report wizard, the ppRWzDlg. Is this possible ?
and how can i do it ? I dont want to add any functionality, but would like
to delete some of it.

Thanks.

Comments

  • edited May 2005
    Hi,

    Take a look at the following articles on creating custom report wizards and
    replacing existing RB dialogs.

    -----------------------------------------
    Article: Custom Report Wizards
    -----------------------------------------

    TppCustomReportWizard is defined in ppWizard.pas. You can create
    descendants and register them with RB. Example can be found in the
    following RB source code files:

    1. The simplest descendant is TppBlankReportWizard defined in
    ppRptWiz.pas. TppBlankReportWizard simply creates a an empty report
    consisting of a header/detail/footer band set.

    2. TppLabelTemplateWizard - the label wizard is defined in ppLabWiz and
    ppLWzDlg. (The Wizards that show a user interface are organized as two
    classes). The wizard shows the wizard dialog.

    3. TppCrossTabWizard is defined in ppCtWiz and ppCWzDlg.

    4. TppReportWizard is defined in ppRptWiz and ppRWzDlg.

    ------------------------------------------------------------
    Tech Tip: Replacing Built-in Dialogs/Forms in ReportBuilder
    ------------------------------------------------------------

    ReportBuilder has an open architecture for replacing any of the built-in
    dialogs. You can replace any of the built-in dialogs by creating a new form
    that inherits from an abstract ancestor and then registering it as the new
    built-in dialog.

    For example to replace ReportBuilder's print dialog you could

    1. Create a new Print dialog by renaming ReportBuilder's default print
    dialog, then doing a SaveAs to save it under another unit name.

    The default dialog resides in RBuilder\Source\ppPDlg.pas and the form is
    called ppPrintDialog. You should assign your form a unique name, for
    example, myPrintDlg, and save the unit to another name. Also save the unit
    to the directory where your other forms are stored (not RBuilder\Source).

    2. Make desired changes.

    You will notice that the print dialog inherits from an ancestor
    TppCustomPrintDialog - this ancestor resides in ppForms.pas (where all the
    abstract ancestor forms for ReportBuilder are defined).

    3. Register the new form.

    Declare an initializtion section at the bottom of the unit:

    initialization

    ppRegisterForm(TppCustomPrintDialog, TMyPrintDialog);


    4. Add the new unit to your project and compile.

    Now your preview dialog should be automatically created and destroyed by
    ReportBuilder. The two page preview dialog in the
    RBuilder\Demos\Reports\Demo.dpro was created this same way. The only
    difference is the ppRegisterForm call is in then OnClick event of the
    button.


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.