Quick fix for QR2 displaying SUM(table.field)

Some time ago I corresponded with somebody on this newsgroup about QR2
displaying a formula rather than the result of the formula (eg:
SUM(table.field) instead of 1,234.56).

I didn't understand the post at the time because I used SUM() frequently,
and without problem.

However... I have just started a new reporting project, and I think I've
just run into the problem the other correspondent was experiencing.

Here's the situation... I have a simple master-detail report where the
relationship between the master and detail is 1:1, so fields from both
tables appear in a *single* QRDetail band.  This works OK.

The problem occurs with the end-of-report totals on the QRSummary band.  The
totals derived from the master table fields are OK, but the totals derived
from the detail table show as: SUM(blah).

The problem is that QR associates a datasource *by Band* -- (QuSoft this is
so dumb!) -- so, despite the fact that the QR equation editor will let you
choose a field from any datasource for an aggregation, the aggregation will
not work unless it is based on the correct band.

Here is a quick fix...

(1) Add a QRSubDetail band to the report.

(2) Set the SubDetail band's datasource to the detail table, then set :
'SubDetail.Enabled := False;'  so that it won't affect the report.

(3) Next open the Object Inspector for the aggregates (QRExpression) which
are based on the detail table, and set the Master property to the SubDetail
band.

This produces the correct totals for the detail table fields, in my
situation at least.

Bryan Dayton