Expression Builder
Hi
I am new to birt.
I have built the query in the report designer
select * from users where user_name = ?
I have added report parameter to filter which will be from user. Now I have one issue. If the user selects ALL i should skip the where clause.
How can i do that
Thanks in advance
I am new to birt.
I have built the query in the report designer
select * from users where user_name = ?
I have added report parameter to filter which will be from user. Now I have one issue. If the user selects ALL i should skip the where clause.
How can i do that
Thanks in advance
0
Comments
-
Sangaran,
I'm guessing you have also created a query parameter which uses the value from your report parameter.
Instead, you can define your query as:
selects * from users
You will then need to apply 2 filters:
1. to test if the parameter value was entered.
apply a query filter (edit data set -> filters, click new)
from expression, click Fx, in category, select Report Parameters, in sub-category, select All, then double click your parameter to paste it into the expression builder, then click ok
from operator, select not equal to
from value1, enter ALL (or the underlying value matching ALL)
2. to test if the parameter value matches user_name.
apply a query filter (edit data set -> filters, click new)
from expression, select user_name
from operator, select equal to
from value1, select build expression, in category, select Report Parameters, in sub-category, select All, then double-click your parameter to paste it into the expression builder, then click ok
Let me know if that doesn't work,
Regards,
Cedric0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management