Home Server

Sequence of Events for ReportTemplateVolume

edited November 2006 in Server
Not really one I think I'll get an answer to; I'll have to workaround it.

I have an application that accesses more than one database, each with the same set of reports, though the templates may be different
for each database. I want to pass the database to the Report Server as a report parameter, and have the server connect each time a
report is requested. Given the sequence of events of a ReportTemplateVolume this cannot be done.

The number in square brackets is the instance of data module created ....

App Startup ...

[1] TDataModule1.Create
[1] TDataModule1.Destroy
[1] rsReportTemplateVolume1Destroy

ClientReport Request ...

[2] TDataModule1.Create
[2] rsReportTemplateVolume1BeforeBuildDirectory
[2] dbReportsBeforeConnect (ok, can use the parameters read in event above)
[2] rsReportTemplateVolume1AfterBuildDirectory
[2] rsReportTemplateVolume1GetDirectory
[2] TDataModule1.Destroy
[2] rsReportTemplateVolume1Destroy

[3] TDataModule1.Create
[3] rsReportTemplateVolume1GetPublishingOptions (no parameters available)
[3] dbReportsBeforeConnect (******* how can you figure out what to connect to!!! ******)
[3] rsReportTemplateVolume1LoadReportStart
[3] rsReportTemplateVolume1LoadReportEnd
[3] rsReportTemplateVolume1AuthenticateReporsReportTemplatertAccess
[3] rsReportTemplateVolume1ValidateReportParameters
[3] rsReportTemplateVolume1BeforePublishReport
[3] dbDataBeforeConnect (ok, can use the parameters read in event above)
[3] TDataModule1.Destroy
[3] rsReportTemplateVolume1Destroy


  • edited November 2006

    - Try using the SessionParameters and then OnAutenticateReportAccess event
    to control the database connection string.

    - Make sure that when you save the DataModule in Delphi, the
    ADOConnection.Connected property is set to false, otherwise when the
    datamodule is created on the server the ADOConnection property will be set
    to Connected to true before you get a change to set the connection params.

    As for the events that you show...

    - at App Startup an instance of the datamodule containing the
    ReportTemplateVolume gets auto-created, the reportvolume registered with the
    catalog and then the datamodule isntance is free'd.

    - the first clientreport request is a request for the volume directory - the
    directory will be cached by the client, so this will not happen often.

    - the second clientreport request looks like request for a specific report.

    Nard Moseley
    Digital Metaphors

    Best regards,

    Nard Moseley
    Digital Metaphors
This discussion has been closed.