Articles menu

 

The best components for the best developers

maj 01. 2007
Running Win32 kbmMW application servers on Linux using WINE
User article

apr 03. 2007
Performance comparison of kbmMemTable Std/Pro and AnyDAC CDS

nov 15. 2006
The king has died...
Borland/CodeGear

jun 16. 2006
The story of 3rdparty announcements and reactions on them
General

maj 29. 2006
Solving the 'cannot find drf file' problem when compiling packages.
Delphi

feb 21. 2006
kbmMWCnnfig.inc explained
kbmMW

feb 14. 2006
ReportBuilder 10 enduser report design with kbmMW
kbmMW/RB10

feb 09. 2006
Tips to setup IIS/ISA to operate as proxy between kbmMW client and server.
kbmMW/IIS

feb 08. 2006
Some thoughts about Borlands decision to split out its IDE/Tools division
Borland

jan 08. 2006
Things to be aware about when moving from Datasnap to kbmMW
kbmMW related

jan 08. 2006
Long running client controlled (stateful) transactions and the query service.
kbmMW related

jan 08. 2006
Secure messaging tips.
kbmMW WIB related

jan 08. 2006
Updating time in MSAccess Database with ADO
kbmMW related

jan 08. 2006
Upgrade from kbmMW v1 to kbmMW v2
kbmMW related

jan 08. 2006
Cross database and macro support
kbmMW related

ReportBuilder 10 enduser report design with kbmMW

kbmMW/RB10

One of the major report designer/generators for Delphi/BCB is Report Builder from Digital Metaphors.

They have just reached version 10. Lately there have been several questions on how to use kbmMW with RB10. This is what this article will try to provide an answer for.

kbmMW contains a so called DADE plugin, which is Report Builders generalized API towards databases. The kbmMW based DADE plugin lets one or more published queries, on one or more query services, on one or more app servers (that was a complex sentence) operate as a virtual database for the Report Builder designer and report generator.

Prepping the development environment

Firstly install RB 10 if you havnt already. As far as I can tell, you need to use Professional version as minimum to have support from the RB side for DADE.

Next step is to ensure that the kbmMW DADE plugin is installed in the component palette. The DADE plugin is only available with kbmMW Pro, ProPlus or Enterprise Editions. In case you have one of these editions, open kbmMWConfig.inc and ensure that it also contains the following lines:

{$DEFINE KBMMW_RBDADE_SUPPORT}                         // ReportBuilder DADE support
{$DEFINE KBMMW_USING_7_NEWER_RB}                       // If using RB 7 or newer.

If the lines are in place, and you have compiled the kbmMW runtime and designtime packages, you should find one new component in the kbmMW DADE component tab: TdakbmMWDatabase

If not, then make sure you are using the latest version of kbmMW, as a misspelling was introduced in one of the earlier 2.50 versions. This was fixed in start of January.

A client side designed report demo

The demo is based on having the standard BDE demo application server (any other of the standard database demo application servers is also fine). The demo application server contains a query service, which in turn contains 3 published kbmMW query components, ALL_EVENTS, SELECTED_EVENT and CLIENTSIDEQUERY.

Each or all of these queries can be used by RB to query for data.

In kbmMW's install directory you will find a Demo folder. In it you will find a sample application (based on one of the demoes provided with RB) with all the needed kbmMW and RB components (for more information about how to make this application, please read the whitepaper in the University section.)

When this demo application is run, one button will show... Launch. Click it.

To design the report, we need to select the data to be used for the report. In RB, there are several ways to obtain data. The one kbmMW provides is the DADE method.

We select the Data tab and in it, the menu File - Data Settings to prepare for accessing a backend kbmMW virtual database..

 

In this screen, we can choose which published query on the application server that we want to use for getting our data. That means that its possible to access different databases by simply putting multiple appropriate queries on the query service on the application server, each pointing to their specific database. The end user will not know, or need to know, where the data in reality originates from.

Due to this design, its even possible to feed virtual data to the end user by for example publishing a TkbmMWMTQuery which is a query component that accesses a memory table. The contents of the populated memory table will simply be the data provided for the end user's report design.

Next we define a dataselection, via the menu New and selecting either using the 'Query wizard' or the 'Query designer'. For demo purposes we just use the Query wizard.

The wizard have obtained all the tables known to the application server via the given published query. Its possible to filter or modify what tables are available for the end user report designer to use, by putting some code in the query services OnApproveMetaData event.

Lets select for example the Customer, and simply go thru the wizard step by step. Finally we choose to see what the query brings back to us.

And when we close that data preview, we will see a box containing the fields of the defined query.

Now its possible to return to the designer tab where we now can select the chosen queries and drag and drop the fields to the report.

Limitations of end users freedom

One of the biggest problems with end user report designer tools, is that the end user often gets full access to a database. This problem can be solved efficiently using kbmMW as a virtual database.

All requests for data are going thru kbmMW, and thus all the requests can be monitored, data selection limited, requests modified etc. to provide the level of security that is required.

Also consider that users are - usually - not programmers and do not understand the potential performance hit a given report could pose to a database. I.e. selecting an open join between multiple tables with millions of rows in each is something that can bring even the best database to its knees. This is another reason why there should be implemented quite strict limitations or control over what end users are allowed to do in the reports.

As kbmMW is there as the intermediate, thats a natural place to put the restrictions.

Kim Madsen


(Top)

 
 

User comments

<snippet from Borland newsgroup>

I just want to let everyone know that doesn't already know: The ...
(more)

Hey, this is actually bringing the fun back to programming!!!!! ...
(more)

I am using kbmMW™ with systems that have as many as 1600 users at one time. The porduct is far more forgiving than any ...
(more)

I am an advanced Asta user ...
(more)

 
 
 
CodeGear Technology Partner Components4Developers is the only major 3rdparty CodeGear Technology Partner approved n-tier vendor!

Copyright© 2001-2008 Components4Developers - All rights reserved