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

Reporting system design issues

edited January 2004 in General
Hi,

I'am designing a new report system for our product.
Delphi 6 ent, RB 6 ent, Firebird 1.5

Some requirements:
1) end-user should be able to create new reports/ modify existing
ones(copying default ones and then modifying them)
2) prefferably store reports in the DB and have no or minimal corelation
with .exe
3) flexible and customizable auto-search filters(for instance, filter dialog
box may have combo-boxes, datetimepickers, grids etc; also user may want to
have option on the filter dialog box to hide any of report
title/header/detail/footer/summary bands;
last used search criteria should be saved in order to display them next time
user open report - important !!!

Some notes.
DB consists of aprox. 130 tables and 50 Views and 100 stored procedures.
Existing report system (Quick Report based) heavily uses stored procedures
to retrieve report data.

Having all that, I have the following questions:
1) As far as I know, stored procedures and views are not available in the
DADE's. I read that I need to create a custom dataview descendant but still
won't be able to use the visual query tool required for end-user solution.
How to overcome this situation ? Any working examples ? Does RB team have
any plans to extend DADE for using SP and Views ?
2) Would it be the best solution for filtering (see requirement 3 above) to
create custom filtering forms in Delphi and then invoke it from RAP to
search and other parameters ?

With kind regards,
Dmitry

Comments

  • edited January 2004
    Hi Dmitry,

    1. Table Views are not supported in the currently release. However, we have
    had a few customers modified the DADE plug-ins for various databases, to add
    support for views. The TdaSession.GetTableNames method is the responsible
    for returning the list of available tables. This feature is currently on
    our todo list of future enhancements.

    A customer using RB and IBExpress sent the following proposed code
    modification to support Interbase views. Try using this code....


    File daIBExpress.pas

    {---------------------------------------------------------------------------
    }
    { TdaIBXSession.GetTableNames }

    procedure TdaIBXSession.GetTableNames(const
    aDatabaseName: String; aList: TStrings);
    var
    lDatabase: TIBDatabase;
    lTable: TIBTable;

    begin
    {get the database}
    lDatabase := daGetIBXDatabaseForName(aDatabaseName);

    lTable := TIBTable.Create(nil);
    lTable.Database := lDatabase;

    {this is a new line, not Digital Metaphors default,
    to allow You to make a report based on a View too,
    rather than just using Tables}
    lTable.TableTypes := [ttView];

    {connection must be active to get table names}
    if not lDatabase.Connected then
    lDatabase.Connected := True;

    {get list of table names from a table object}
    if lDatabase.Connected then
    aList.Assign(lTable.TableNames);

    lTable.Free;

    end; {procedure, GetTableNames}

    2. It is possible to create custom autosearch dialogs that can be tailored
    to your needs. Please see the example located in the \RBuilder\Demos\5.
    AutoSearch\4. Custom AutoSearch Dialog\... directory.


    --
    Best Regards,

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