Home Server

Explorer volume : Dynamically add where clause in SQL

edited March 2005 in Server
I have a lot of reports, including very large reports. Due to the nature of
the database type, all data needs to be retrieved from the database at once.
This takes too much time. All data is retrieved whenever a single report is
requested. Is there a way to determine which report is being requested, and
set a query parameter at run-time?

I attempted to use the events provided by the explorer volume, but they only
fire after the reports have been retrieved. So when I add a parameter, the
reports are retrieved before the parameter value has been set, and a message
that the requested report does not exist appears.

How can I fix this?

Regards,
Mariella

Comments

  • edited March 2005

    Try using the ReportVolume BeforePublishReport event to initialize it. This
    event has an aEventParams object parameter that provides access to the
    report instance.


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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2005

    See the online helpf to the ReportVolume BeforePublishReport event and the
    TrsBeforePublishReportEventParams class


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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2005
    Well, the problem is that the report needs to be retrieved from the
    database, and that sql statement should be dynamic..

    The BeforePublishReport method also occurs AFTER the explorer attempts to
    load the report from the database. I need an event which fires BEFORE the
    explorer attempts to load the report from the database, so I can set the
    parameter in the query component to only load the requested report.

    Regards,
    Mariella

  • edited March 2005

    Sorry, I misunderstood the question.

    Try using the ReportVolume.OnGetPublishingOptions event. It occurs before
    the report is loaded.



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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2005
    Hi Nard,

    Also when using the event OnGetPublishingOptions, the error "No report found
    in catalog" fires before this event..

    Regards,
    Mariella

  • edited March 2005

    From looking at the source code to the server, the OnGetPublishingOptions
    event fires prior to the report being loaded from the database or any error
    being raised.

    Try modifying the example installed to the RBServer\Demos\Servers\02. Volume
    Types\04. Reports in an Explorer Database so that it demonstrates the issue
    that you are encountering. Send in zip format to
    support@digital-metaphors.com and we can check it out here.


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2005
    Hi Nard,

    I have sent an example to your e-mail.

    Regards,
    Mariella


This discussion has been closed.