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

Manual start rsReportExplorerVolume

edited December 2005 in Server
Hello,

I am trying to adapt a normal rbuilder 9.03 end-user reporting solution
to RBserver (oracle d7).
My target is to share the more code as possible of the non rbserver
solution.
My very very first problem arises very very soon.
After a lot of tries it seems that I am unable to control the behaviour
of the rsReportExplorerVolume component.
I need to set the whole environment, which means database connection,
datasets and so on, at *runtime*
So I need to manually create the dm unit in which resides the
rsReportExplorerVolume and/or even manually at runtime set the property
FolderPipeline and ItemPipeline
I would eventually need to also manually create the
rsReportExplorerVolume itself..
But it seems that rsReportExplorerVolume works only if it is in a
autocreate unit and I am unable to find a method to manually start it
I totally dislike this kind of "automation"
I really need an rsReportExplorerVolume.active := false / true method, I
think..
Are there any ??

Thanks in advance
Bye
Nicola

Comments

  • edited December 2005
    I found the rsReportExplorerVolume.OnCreate event but it doesn't work as
    stated in the help
    Opening here the folder dataset doesn't work
    I resolved using the TDatamodule.OnCreate event
    but my humble opinion is still for the need of an active := True property..
    Bye
    Nicola
  • edited December 2005

    1. Manually registering a report volume

    The volume is only in the autocreate list so that it can be automatically
    registered with the server, when the server starts up. The datamodule is
    subsequently free'd as soon as it is registered. An alternative is to
    manually register the volume in the datamodule's Initialization section. An
    example appears below. The first parameter should correspond to the
    TrsReportVolume.VolumeName property. The second is the class type of your
    descendant DataModule (i.e. Delphi creates a descendant of DataModule such
    as myDataModule = class(TDataModule) )

    uses
    rsReportCatalog;

    Initialization
    TrsReportCatalog.RegisterVolume('myVolume', myDataModuleClass);


    2. Instancing

    A separate instance of the ReportVolume module is created for each user
    session that is accessing the volume. So using the datamodule.OnCreate will
    fire many times. However, be aware that by default the TrsReportCatalog
    singleton will cache the volume directory info (i.e. folders, items) to
    speed performance. You can set Reportvolume.DirectoryOptions.EnableCaching
    to false is you prefer to turn this off.

    An alternative is to use the ReportVolume.OnGetDirectory event to modiy the
    Directory tree structure prior to it being sent back to the client.







    Best regards,

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