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

Changing the Query Designer Screen Layout

edited July 2003 in General
Hello

We are registered users of ReportBuilder with source code and would like to
know if the layout of the listviews on the query designer tabsheets can be
changed and if so how. Currently they are split horizontally but I would
like them to be split vertically, so that, for example, on the Tables
tabsheet the "Available Tables" list is on the left and the "Selected
Tables" is on the right.

We are using Delphi 5 (Update pack #1) and ReportBuilder Pro 6.03

Thanks
Louis

Comments

  • edited July 2003
    Louis,

    To do this you will need to replace and re-register every dialog in the
    Query Designer and re-code them to have a vertical separator rather than a
    horizontal one. This is possible as all dialogs in ReportBuilder are
    replacable. See the article below for more information.

    ------------------------------------------------------------
    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 preview dialog you could

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

    The default dialog resides in RBuilder\Source\ppPrvDlg.pas and the form is
    called ppPreviewDialog. You should assign your form a unique name, for
    example, myPreviewDlg, 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 preview dialog inherits from an ancestor
    TppCustomPreviewDialog - 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(TppCustomPreviewer, TmyPreviewDlg);


    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.


    --
    Best Regards,

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