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

Can a different query builder be used with Report Builder

edited March 2006 in General
Is it possible to plug in a different query builder wizard or query
builder or are you limited to the one that come with Report Builder?



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

Comments

  • edited March 2006
    Hi,

    It is possible to replace almost all dialogs in ReportBuilder with the
    exception of the Designer. Take a look at the following article 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.


    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hi,

    No, the Query Wizard and Query Designer are separate from the designer. See
    the daQueryWizard.pas and daQueryDesigner.pas files in the
    \RBuilder\Source... directory.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hi,

    Take a look at the following article for additional information...

    ----------------------------------------------------------------------------------
    Tech Tip: Implementing a Custom Data Designer
    ----------------------------------------------------------------------------------

    Data Designers descend from TdaCustomDataWizard which is defined in
    daDataWizard.pas.

    The TdaCustomDataWizard class defines a class function called DataViewClass
    that should be overriden by descendants classes to specify the DataView
    class for which the data designer is implemented.

    The daRegisterWizard and daUnRegisterWizard procedures defined in
    daDataWizard.pas are used to register and unregister Data Designers with
    DADE.

    For an example of a data designer, see daQueryDesigner.pas which contains
    the default QueryDesigner. The TdaQueryDesigner class overrides the
    DataViewClass method to return TdaQueryDataView. Therefore, the
    QueryDesigner is used with any descendant of TdaQueryDataView
    (TdaADOQueryDataView, TdaBDEQueryDataView, etc.).

    For an example of registering a Data Designer, see the initialization and
    finalization sections of daIDE.pas.

    Note: To replace an existing Data Designer, unregister the default designer
    first:

    initialization

    daUnRegisterWizard(TdaQueryWizard);
    daUnRegisterWizard(TdaQueryDesigner);

    daRegisterWizard(TmyCustomQueryWizard);
    daRegisterWizard(TmyCustomQueryDesigner);

    finalization

    daUnRegisterWizard(TmyCustomQueryWizard);
    daUnRegisterWizard(TmyCustomQueryDesigner);

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    >Is it possible to plug in a different query builder wizard or query

    Can I confirm something.

    Is the the Query Builder part of the Designer Dialogue or Is it considered
    a different dialogue. If so does that mean that the query builder cannot
    be replaced??



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.