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

New User Question

edited September 2002 in General
I am very new to using Report Builder Pro and wanted some advice on the best
approach to the following.

I want to create a Delphi form where the user selects a set of parameters
and then pass these into my report.

What are the pros and cons of these 2 approaches:

1) Create a parameterised TQuery and then set the query parameters before
opening the query and printing the report. (this doesn't seem to make use of
the extra functionality avialable in the Pro version)

or

2) Create a dataview using DADE and set the parameters using the
'BeforeAutoSearchDialogCreate' event.

Thanks for any advice.

--
Kind Regards,

Matthew Pascoe
Logistics Information Systems
Ph: (02) 9236 7325
Fax: (02) 9590 9293
Mob: 0418 465 353

Comments

  • edited September 2002
    The second approach is usually preferable, because it allows you to save the
    report in a file or the BLOB field of a database table. You can then reload
    the report from anywhere in the app, since it is not 'form bound'. This
    means that you can change report definition, send the new report to the
    user, and your app can automatically use the modified report.

    With the first approach the report is bound to the TQuery and saves it in
    the Delphi form. In order to change the report, you have to recompile the
    app.

    --
    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
  • edited September 2002
    Hi Tom,

    Thanks for your reply.

    A couple of further questions:

    1) If I do use the first approach, I can still save the actual report layout
    to file and let the users modify it, can't I?

    2) I would like to use the second approach, but have a Delphi report
    selection form that contains controls the user selects the report parameters
    from (eg dates, drop down combos, etc) and use these to 'override' the
    autosearch options and set the parameters in code. If I create a copy of
    this report and 'detach' it from the Delphi form, will the autosearch option
    just re-activate itself?

    Thanks & Regards,
    Matthew.


This discussion has been closed.