Home Server

Filtering reports based on user id

edited March 2005 in Server
Hi .. suppose I want to filter the Reports exposed by the Report Explorer,
based on user id.

So, some user only see those reports related to him.

My idea, was to build some Sql with 'user' parameter, inside the Query -
TAdoQuery actually - connected to the TDataSource, connected to
TppDbPipeLine - the ItemPipeLine -

Something like ..

Select Items.* From Users Left Join Items
On Users.ItemId=Items.ItemId And Users.UserId=101

Then I used the OnValidateSessionParmeters to assign the parameter. Then ..
I invoke some method inside the DataModule with the Querys,
TrsReportExplorerVolume, etc ..

Then I get some error .. like a null pointer, like the reference to the
DataModule (holding the Sources,PipeLines,TrsReportExplorerVolume,etc) was
lost ..

Why is that ??

Thanks !

Roberto

Comments

  • edited March 2005

    1. For an example of filtering the directory based on a session login check
    out theRBServer custom parameter demos installed to

    RBServer\Demos\WebTier\CustomParameters
    RBServer\Demos\Clients\CustomParameters
    RBServer\Demos\Servers\CustomParameters

    The demos work together, each includes a ReadMe.doc and commented code.

    2. I do not know why your attempted solution is not working. Check out th
    examples above. If you want to create a simple example or modify the above
    example, you can 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
This discussion has been closed.