Help with Match object

Hi All,
In a report I need to create a couple crosstab reports which have year along the X-axis and product along the Y-axis…and Quantity is the measure.

Now, each crosstab is for a particular type of product. ie)
Cross tab 1 - Products beginning with “a-"
Cross tab 2 - Products beginning with "x-

Cross tab 1 - Products beginning with “y-*”

At the block level the 'Matches pattern" operator is not available(its available on at the query panel level)

So I want to create this object for each kind of product. I tried the match function but its not working at desired.

At thoughts on how i could get such an object. Or any other solution is also welcome
Thanks
Mina


meenaj (BOB member since 2005-01-12)

Could you please explain why Match() function didn’t work as expected?


Jansi :india: (BOB member since 2008-05-12)

I assume you mean that MATCHES PATTERN isn’t available if you apply a report filter at block level within the report (although you can use it as a query filter).

Try using the GREATER THAN operator instead. It will do an ascii comparison for you, eg: > B will give you C, D, E etc. You’ll have to check where lowercase, uppercase and punctuation come in an ascii sort list as I can’t remember but it’ll be on the net somewhere.

debbie


Debbie :uk: (BOB member since 2005-03-01)

Could you try a variable:

v_Product = Substr([Product];1;2)

and then filter on

[v_Product]=“a-”

and so on.


Damocles :uk: (BOB member since 2006-10-05)

I don’t think you need to do it at query level.
Though pattern matching is not directly available in report/block filter, you can create a report variable as flag using “Match” function and then set the flag as “Yes” to filter your values.


Prashant Purohit :india: (BOB member since 2009-02-18)

Prashant, the problem with that approach would be that one would need one variable per crosstab. The beauty of a substring approach is that it produces only one user defined variable and thus less post data retrieval processing at the front end.


Damocles :uk: (BOB member since 2006-10-05)

You are right :yesnod: , I didn’t see your solution before posting mine :slight_smile:


Prashant Purohit :india: (BOB member since 2009-02-18)

Thanks to all for responding and Damocles
the substring option worked…Thanks again


meenaj (BOB member since 2005-01-12)