Replies: 2 comments
-
This isn't a standard question on BIRT. The importanst step is to have your user on the context then I see 2 options to solve it:
On both implementations is the question how many different conditions do you have(?) Option 1) - Idea, change the filter condition based on the user name The SQL-query can be manipulated in the "beforeOpen()" of the data set. You will get the query with the "this.queryText".
The patern /[-replacement_user_based_beforeOpen-]/ should be replaced in the "beforeOpen()"-method with the uset dependend condition. beforeOpen() with the replacement mechanism (demo):
Option 2) - Idea, give the user name like a parameter to the SQL statement and create there the filter condition This way is competely based on the SQL statement and the only BIRT step is to set the user name (for example) with a parameter to the data set. The you can handle the conditions completely on SQL level. I don't know if you will use MS SQL Server or Oracle. But I have done it in both versions. MS SQL Server example "fixed conditions" (I would use if the condition count isn't so much):
So I hope you got some ideas of the options. I have further ideas but it would be to much and |
Beta Was this translation helpful? Give feedback.
-
I think the short answer is "No, unless you provide it". |
Beta Was this translation helpful? Give feedback.
-
Infomaker has a filter function where, after the report is generated, the user can apply sql like conditions on values contained in any (or all) of the columns that were retrieved by the report. For example in a report that lists the daily sales for all staff from 100 stores in all States for a given date range, the user can further refine the result set by applying a filter like: (staff_lname like 'T%') and (sales_value > 500.00) and (state_id in (21,56)).
Is there a way to do this type of dynamic/user driven filtering on all available report columns in BIRT?
Beta Was this translation helpful? Give feedback.
All reactions