Home End User

report explorer without design (some reports only)

edited October 2002 in End User
Gentlemen

I know there is an option ioAllowDesign in explorer to not show the design
tab but I must allow this (design) in some reports.
Changing this after the execute method change nothing.
Do you have another way to limit design to some reports?

Thanks

Marcos Cunha Lima

Comments

  • edited October 2002
    You can add a boolean field to the database to contain this information,
    then you can make the report read only. Here is an example:

    http://www.digital-metaphors.com/tips/ReportExplorerWithReadOnly.zip


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    Jim

    I downloaded the example but it creates another explorer form and I'm
    already controlling what each user could do (eg passwords, show only the
    user's reports, etc).

    What I need to do is only show the preview tab in some reports (reports that
    the user cannot change just run) in report explorer, eg, set the itemAction
    of the explorer to iaOpentoDesign in some reports and iaOpenToPreview in
    anothers. I know that I cannot do this now as this is set when the explorer
    executes as a whole. is there another solution or workaround?

    Thanks

    Marcos Cunha Lima
  • edited October 2002
    The best option at this point is to create a replacement report explorer
    form. This way you can listen to see when the selection changes and read a
    field value form the item dataset to determine if it is AllowPreview or
    AllowDesign. Then you can set the report explorer item options and call
    TppReportExplorerForm(ReportExplorer.Form).Initialize and
    TppReportExplorerForm(ReportExplorer.Form).Refesh. That should cause the
    behavior that you are looking for. There is an example of customizing the
    report explorer form in the Developer'sGuide in the RBuilder installation.
    You will want to look at the ListSelectionChangeEvent to trigger/broadcast a
    new communication to the outside world that a selection has changed and that
    the report explorer should use new item options.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    Jim

    Thanks. I have did it. What I have done is create another Report Explorer
    form as you advice but created a new event, eg, onBeforeOpenItem
    (intercepted the openitem procedure) and left our application staff do the
    logic for each report.

    Could you help me with another one? I have finished the whole security
    environment but discovered a hole on it. If a user starts editing their
    report, it have access to open all the other reports (and then save as...
    and edit as it's their report). I cannot figure out how can I stop the user
    to load a report that he cannot have access. I'm intercepting the
    onloadstartevent and onloadendevent but if I discover that this report is
    not allowed to be loaded by this user, if a cancel, exit or abort the
    application freezes. How can I (in these events) prevent the user to load
    some reports?

    Thanks

    Marcos Cunha Lima
  • edited October 2002
    The report explorer data comes from datapipelines. You can filter the item
    dataset for that particular user (add a field to the dataset that has a
    security level integer to compare to the user's security level) so that the
    report explorer never gets those items which s/he shouldn't have access to.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.