Exclusion filtering on multiple fields - Report

raven44raven44 Member Posts: 85
Hi,

Scenario:
Type field
Sub-type field
3 Value fields

Grouping by Type and Sub-Type to obtain totals.

You want to filter out where the 3 Values are all 0 (including removing the group header sections).

Is there where you could utilise FILTERGROUPS? or how would filter this scenario?

I know you can use FILTERGROUPS to have multiple filters on 1 field: http://www.mibuso.com/forum/viewtopic.p ... iltergroup

Thanks

Comments

  • krikikriki Member, Moderator Posts: 9,110
    Just put a filter the 3 fields.

    The filtergroups you use when you have multiple filters on the SAME field. Or (for forms) when you DON'T want that the user can remove the filters you put programmatically .
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • raven44raven44 Member Posts: 85
    hi,
    thanks for your reply, its just that applying a filter on the 3 value fields seperately could exclude certain records that have a value in 1 of the fields.
    eg.
    field 1 = 0
    field 2 = 1
    field 3 = 0

    apart from creating a temp record and then reporting on the temp record, im wondering if there is a certain filtering method (similar to FILTERGROUP) that could be applied on the record.
  • DenSterDenSter Member Posts: 8,305
    You can always program it, but that might not be very good for performance. In the OnAfterGetRecord trigger of your dataitem:
    IF ((MyRec.Field1 = 0) AND
        (MyRec.Field2 = 0) AND
        (MyRec.Field3 = 0)) THEN
      CurrReport.SKIP;
    
  • raven44raven44 Member Posts: 85
    Hi,

    I did follow a similar route to that suggestion (which for now is fine) but as you say, might not be good for performance...especially later on when theres more entries in the table.

    I was really just hoping that there was some function which I didnt know about that could've performed this type of request.

    Thanks for all your answers!
Sign In or Register to comment.