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

SQL on large databases

edited July 2006 in End User
Hi,

Some reports that are selected by end users take a long time to run when
they choose a wide selection range. While it is processing the SQL, is
there a way to cancel the SQL process via the selection of the cancel
button. At the moment, there is a cancel in the reportbuilder gui, but it
has no effect until the SQL process is finished and the report display
starts processing.

RB7

Thanks

Alex

Comments

  • edited July 2006

    - try a creating simple test project with a query dataset on a form (i.e. a
    test with just a dataset and no RB). Place the long running SQL statement in
    the query dataset. Put a button on the form and in the button OnClick call
    dataset.Open. At this point the SQL will be submitted to the database and I
    am almost certain that the thread is blocked - there is no way to Cancel.

    - the only way to get around the above would be to use a separate thread for
    the dataaset.Open call. That is not a feature that is currently part of RB.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2006
    Hi Nard,

    We use DBISAM which has a QueryProgress event where you can abort a query.
    I presume using this would work but I would need to act on the ReportBuilder
    Cancel button? Is that correct? Any tips appreciated.

    Thanks

    Alex

  • edited July 2006

    Try creating a custom preview plugin class and override the Cancel method.

    The preview plugin manages the viewer, toolbar, outline and other user
    interface contols displayed by the preview dialog and the designer preview
    page. See TppPreview in RBuilder\Source\ppPreview.pas. You can descend from
    this class and then register your custom preview plug-in with RB. See the
    Initialization section of ppPreview.pas for the registration code.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.