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

How to generate correct dialogs for webtier/server?

edited June 2006 in Server
Hello,

I am working on a Report Builder Server application using Delphi 7 and
RB Server 10.02

We have a client-server product that is used to design and run reports.
That part all works fine.

We also have an ISAPI web dll application that uses the webtier
component and a server module that talks to an Oracle database via DOA
controls.

The server module has an externally configured connection to the database.

So far so good.

We are able to browse to the ISAPI web module, view the list of
available reports using the web based report explorer.
We are also able to select a specific report and return data.

The problem comes when the specified report has parameters.
When these parameters are simple text or numbers this also works fine.
The web dialog is auto generated by the report builder.

Its when the parameters need to be chosen from a list that I am simply
baffled.
My lists are simple enough name, value pairs that are retrieved from the
database.

At runtime I have to determine which list to use from the database based
upon the field that requires parameterization.

I have tried to modify the demos that ship with report builder but alas
to no avail.

I seem to get it working one step away from what I am trying to achieve,
but any further than that and I hit a brick wall and have to start again.

My main issues seem to be understanding which event handlers of the
TrsReportTemplateVolume to use.
I'm guessing its OnGetReportParameters or OnValidateReportParameters

What's the difference between SessionParameters and ReportParameters and
how do I uses them.

Has anyone got any code examples that I can use to learn more and maybe
even get my application to the next level???

Thanks in advance.

Comments

  • edited June 2006

    Below are two articles that I think will help you...

    ---------------------------------------------------------------------
    Article: Overview of Custom Parameters Architecture
    ---------------------------------------------------------------------


    I. SessionParameters
    --------------------

    1. Each time a client communicates with the server, the client must send the
    session id.

    2. Each time the server receives a client request, it authenticates the
    request. These are the possible cases:

    a. No session id specified or invalid session id specified
    Validate the session parameters passed from the client. If valid, then start
    a new session and generate a new session id. The session id will passed
    back to the client.

    b. Existing session, no session parameters specified or same session
    parameters specified.
    Use the session parameters for the existing session.

    c. Existing session, new session parameters specified.
    Validate the new session parameters.

    3. The SessionParameters are always passed to the custom parameters related
    events.

    a. For the TrsServer events such as OnValidateSessionParameters, the session
    parameters are passed in the "aParameters" parameter.

    b. For the TrsReportVolume events, there is an "aEventParams" parameter that
    contains a SessionParameters property (i.e. aEventParams.SessionParameters).
    Note that the aEventParams object contains a different set of properties
    depending upon the report volume event. The specific properties are
    documented in the online help


    II. ReportParameters
    --------------------

    ReportParameters are only relevant to a request for a specific report. The
    relevant ReportVolumeEvents that are provided are: OnGetReportParameters,
    OnValidateReportParameters, and BeforePublishReport. Each of these events
    passes an "aEventParams" object to the event-handler that contains the
    SessionParameters, ReportParameters, and other information. Again, note that
    the aEventParams object contains a different set of properties depending
    upon the report volume event. The specific properties are documented in the
    online help.

    The ReportParameters passed from the client are automatically assigned to
    the TppReport.Parameters property. In the server custom parameters demo, the
    ReportTemplateVolume.BeforePublishReport event is implemented to add the
    session parameters to the TppReport.Parameters.



    -------------------------------------------------------
    Tech Tips: RB Server and Custom Parameters
    -------------------------------------------------------

    The RBServer Custom Parameter demos show how to define custom session and
    report level parameters that can be used to implement security and other
    types of custom processing.

    The are three projects that work together. Each project includes a
    ReadMe.doc and commented code.

    1. RBServer\Demos\Servers\Custom Parameters
    2. RBServer\Demos\WebTier\Custom Parameters
    3. RBServer\Demos\Clients\Custom Parameters


    The demos include examples of how to...

    1. Define Custom Session parameters.

    A custom login form is displayed. Based upon the login, the catalog of
    reports available to the user is filtered.

    2. Define Custom Report parameters

    A custom parameter form is displayed. The parameters are used by the report.

    3. Custom AutoSearch form

    A custom autosearch form is displayed. The parameter values are used by the
    autosearch criteria.







    Best regards,

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