Options

setting a filter on a report which the user cannot change

RuleRule Member Posts: 34
I want to set a filter on a report which the user cannot change.
But he must maintain the possibility to set his own filter (beside the one i've set) in the request Form. So setting a filter and not showing the request form is not an option.
Realisations are only limited by the borders of imagination

Comments

  • Options
    HalMdyHalMdy Member Posts: 429
    See Function FILTERGROUP in the C/Side Online Help.
    With this fct used in trigger OnPreDataItem , you can create "invisible and unmovable" filters ...

    Hope that help !! :)
  • Options
    TbiTbi Member Posts: 33
    Antoher solution is to set a tablefilter in the DataItemTableView property on one or more DataItems in the report.
  • Options
    DenSterDenSter Member Posts: 8,304
    Depending on the FILTERGROUP that you use in code, that is the same thing. I think FILTERGROUP(1) is the one that is used by DataItemTableView, so you can change the value of the DataItemTableView in code by changing the filtergroup. This is in the help files though.
  • Options
    RuleRule Member Posts: 34
    Apparently i've used the wrong trigger to set the Filter.
    I used the PreReport Trigger so the filter wasn't used.
    With the filter set on the predataitem trigger it works just fine.
    Even without setting the filtergroup. The user cannot interact to disable or change the filter on the predataitem trigger.

    Thanks for the help
    Realisations are only limited by the borders of imagination
  • Options
    DenSterDenSter Member Posts: 8,304
    You should know though that you can set two filters on the same field when you use two filtergroups.

    In your solution, the filter is replaced with whatever the user sets on that field. If you use the filtergroup, you can limit the recordset that the user sees, but the user is still able to further filter on that field. Both filters will be applied.
  • Options
    RuleRule Member Posts: 34
    You have a point there.
    This is necessary if you use the report for showing data.
    I use the report only for processing. So there is no interaction except the request form. If i use the filtergroup and there is a wrong combination of filters (because of the user input) there is no data filtered. But if i replace the user filter by my filter i know the data is always filtered my way.
    Realisations are only limited by the borders of imagination
  • Options
    DenSterDenSter Member Posts: 8,304
    Well it could also be necessary on a processing only report, but I'm glad you made it work for you.
Sign In or Register to comment.