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

Sharing Auto Search Criteria

edited December 2003 in End User
Hello

I am using Delphi7 and RB7.03 Enterprise

In my application I have an end user report module where I have pre designed
some of the more complicated reports for the end users. One report uses 4
dataqueries which use the same date range criteria. I wish to have the end
user select the date range just once and then have ReportBuilder (presumably
using RAP) copy the criteria automatically to all the queries. Can this be
done.

Thanks

Tim Murfitt

Comments

  • edited December 2003

    To have the user enter the AutoSearch information only once, only one of the
    dataviews should contain AutoSearch criteria, the others should contain
    search criteria that is not designated as autosearch.

    To apply the autosearch values to the other queries you will need use the
    report's TdaDataModule.DataViews[] array to access the dataviews and then
    extract the TdaSQL object and apply the criteria values.

    The following example shows how to extract the TdaSQL object and add/modify
    search criteria:

    http://www.digital-metaphors.com/tips/ExtractSQLObject.zip


    As a first step, get this working using Delphi code. You could probably use
    the Report.OnGetAutoSearchValues event to apply the search values to the
    other queries.

    Once you get solution working that uses Delphi code, you can adpat it to
    RAP, by but writing a pass-through that you can call from RAP.

    --------------------------------------------------
    Article: Extending RAP
    ---------------------------------------------------

    There are two very simple and powerful techniques to extend the capabilities
    of RAP infinitely. These are summarized below and covered in more detail in
    the RAP.hlp online help. Demos and tutorials are installed to
    RBuilder\Demos\RAP. The tutorial text is located in RAP.hlp.


    1. RAP Pass-Through Functions

    These are functions that appear in the Language tab of RAP's Code Toolbox.
    These functions are written in Delphi and can be called from RAP. RAP's
    pass-through function architecture enable's developers to add new built-in
    functions to RAP's code toolbox.

    2. Extend RAP's RTTI

    RAP's Run-time Type information defines what classes and properties can be
    accessed via RAP. By default the published properties of any class that is
    registered with Delphi's RegisterClass procedure is recognized by RAP. In
    addition many of the public properties and methods of ReportBuilder classes
    are exposed.







    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

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