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

Restricting Data That Shows Up on the report.

edited August 2001 in General
Looking for some suggestions..

I have a security system that allows the adminstrator to restrict user
acccess to data, based on values within the data. Things such as codes
and/or department numbers. The user is basically allowed access to range of
numbers/departments. These restrictions need to also apply to reports (about
30).

One solution would be to create a table with the username and the allowed
numbers/departments, then join that table with the report tables. Although
this would be slick, this is no time for such luxuries.

I've figured out a way to do it with an RB pipeline, with one snag. The
report always prints the last record. I'm using OnFirst and OnNext events to
manually move the Dataset record pointer to the next unrestricted record.
When there are no unrestricted records in the Dataset, the OnFirst moves the
Dataset all the way to EOF. The event then exits and RB promptly prints the
last record and finishes the report.

How can I to tell RB that I dont want a particular record to print, any
ideas?

Comments

  • edited August 2001
    Use AutoSearch criteria on the report. You do not have to show the
    autosearch dialog to the user. The autosearch criteria are used to change
    the query to limit the data that is supplied to the report. Have a look at
    the autosearch demos in your RBuilder installation.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Thanks for the suggestions, although, its not what I needed. I was looking
    for a way to stop Report Builder from printing records on the report AFTER
    the query has returned.

    Is there a way to stop ReportBuilder from printing a record that apears in
    the dataset and meets all of Report Builder's criteria as a valid record to
    print?


    at
  • edited August 2001
    Use the DetailBand.BeforePrint event to check the field value of the
    pipeline. Set the Detailband's Visible property based on the record's
    value. This will hide detail records from printing.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.