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

Is a design time query is being run at runtime?

edited August 2001 in General
When I run a report using a dataview built using the DOA plug in, the
following query is run at print time:

SELECT * FROM B1.CUSTOMER WHERE 'c' <> 'c'

I assume that this is to get the field names for the table at runtime.
However, when I view the RTM file, I see that the field names are stored in
the report. Is there a way to optimize printing by eliminating this call for
each dataview. I run my app over a relatively slow link so each roundtrip
makes a difference. Is this call necessary?

Thanks in advance,

Andy


PS.

Also, as a FYI, the default ReadBuffer for a DOA query is only 25. To
significantly boost performance at runtime, your users may want to increase
this with a minor edit to the daDOA.pas file.

constructor TdaDOAQueryDataView.Create(aOwner: TComponent);
begin
inherited Create(aOwner);
FQuery := TdaChildDOAQuery.Create(Self);
FQuery.ReadBuffer := 500; // increase read buffer to
any reasonable number

Another tip that may prove useful is to have access to views in the report
designer:

Change the following line to the SQL in the procedure
TdaDOASession.GetTableNames to

(object_type = ''TABLE'' or object_type = ''VIEW'')

Hope this helps other users.

Comments

  • edited August 2001
    Andy:

    You could use an coy the DOA-dataset values to an in-memory dataset (such as
    TdxMemData provided by DevExpress on the D6 companion CD. There are also
    other free ones). Then run the report against the in-memory dataset.

    HTH,
    Ed Dressel
    Team DM
  • edited August 2001
    Could you please expand on your explanation or better yet, do you have an
    example?

    Thanks,

    Andy


This discussion has been closed.