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

Changing SearchExpression is very slow

edited January 2005 in General
If I change the search expression of a autosearch field at runtime it takes
7 seconds the first time. Then it's fast. Why that? Any ideas?

--

Mit freundlichen Gr??en
Sven Langenkamp

CT Datentechnik GmbH
Eschenstr. 2
D-31582 Nienburg a.d. Weser
Germany

Telefon: +49 [0] 5021 - 9724-15
Telefax: +49 [0] 5021 - 9724-18
http: www.ctdatentechnik.de
e-mail: langenkamp@ctdatentechnik.de

Comments

  • edited January 2005
    Hi,

    This is not a known issue. This may be an issue with the connection to your
    database. ReportBuilder may be cacheing your pages making the loading seem
    faster for given reports.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2005
    Hello all.

    Oddly enough, I am experiencing this same problem described by Ace. The
    first time a report is ran from within my application, the following line of
    code takes about 7 seconds to execute:
    ppReport1.AutoSearchFields[nIndex].SearchExpression := 1;

    Subsequent execution of this line for the same or any other report executes
    in less than a second. The monitoring the SQL durations during this call in
    SQL Profiler shows negligible numbers. This is not a connection
    initialization issue, as the application has made hundreds of database calls
    through the same connection prior to this line ever being executed.

    Is there something needs to be initialized first that would alleviate this
    problem? The only solution I have found is to add a bunk ppReport object to
    the project that just contains 1 field from a tiny table. During my
    application initialization, I set the SearchExpression for that field so
    that the 7 second delay gets eaten up then while I display a message that
    says "Initializing ReportBuilder Engine...". I do not like this solution as
    it adds 7 seconds to my app startup time.

    Is there a better way?
    Thank,

    Glenn Thimmes.

  • edited January 2005
    I can verify Glenn's statement. The database connection is fine and runs
    fast. I tryed to find something in the RB code but I do not found anything.
    It just takes over 7 seconds to assign the new value.


  • edited January 2005
    Hi Ace and Glenn,

    Thanks for the info. If possible, please construct a small example using
    the DBDEMOS database that demonstrates this behavior and send it in .zip
    format to support@digital-metaphors.com so I can research this further.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2005
    @ Glenn: Which database are you using? I'm working on Oracle 8/9. I tried it
    with a simple access database and I don't got this effect. I will try other
    databases, too.


  • edited January 2005
    It looks like RB has a problem with Oracle databases. I created a new
    database instance and ran the RB SQL script for Oracle 8 to create the
    folder and item tables. I added some data using the RB sample app. Now if I
    have a report with a autosearch field and I set it's searchexpression, I got
    the same problem - it's slow.

  • edited January 2005
    Hi Ace,

    Thanks for the info. I will test with Oracle and get back to you.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2005
    I tested with our Oracle database using your steps below and did not notice
    a slow load. Are you certain this is not a database issue? Perhaps
    indexing your datasets will help. If you are still having an issue, please
    provide me with the exact steps I can take to recreate this behavior.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2005
    I'm using SQL Server. I'll try to put a small sample app together sometime
    soon.

This discussion has been closed.