Filter report based on the role in Cognos BI - business-intelligence

I have a report in Cognos BI with a field where stored username.
A customer wanted to filter data report based on the user who runs this report.
I used filter [report].[user_name]=#sq($account.defaultName)#
and it works.
But now the customer wants to show all data in the report for one specific role in Cognos BI.
Is there any way how can I do that?

This is just a boolean expression. Adjust it to do what you want:
(
[user_name]=#sq($account.defaultName)#
OR
[user_name]='The user name that can see everything'
)
Don't forget the brackets.

Related

OBIEE 11g : Scheduling Reports based on filter

I need my OBIEE Analysis report to be sent to 200 people( all are from different departments) through Actionable Intelligence Agent .
I need to filter the data based on department and send it. I was unable to put the condition in Agent.
Can I filter the data in Dashboard prompt and link the Agent with Dashboard??
Will this work out or any other suggestion for this case??
For those "filter by X and send it to Y" scenarios the best way (in my opinion) is to use BI Publisher bursting options. It's just the textbook case for that.
If you have to stick to the agents in OBIEE, consider enabling row level security for that data following your requirements. Then just configure the agent to send the analysis to the required people and row level sec should do the rest.
If row level security is too much effort, I guess you could play with some auxiliary analysis to filter your main report based on the department of the user. The idea would be the following:
Create a report with the department column in the criteria and a filter by user where the user id is equal to the presentation variable #{user.id} (this is a meta variable that is always available and contains the user logged in).
Filter your main report with a condition where department is based on the results of another analysis (the previous one), so it will return the right department for each user.
Configure your agent to be sent as recipient (not as a specific user) and use the analysis in point 2 as the content to be delivered
Set your 200 recipients manually or use a condition report to get them
Make sure that both analysis in points 1 and 2 are saved in a place where all the users can read them.
I'm quite sure that it will work too :)
Though to be clear, my first option will be BIP bursting followed by proper row level sec.
Hope it helps!

Database validation for a user input text field in oracle UCM | WCC

I'm new to Oracle WCC.
In Oracle WCC/UCM( Universal content management), I have one table named CreateStudent has 2 columns StudentID and StudentName.
One metadata custom field XXStudent_Info for which user will pass the value on Checkin page.
We need to validate the value of XXStudent_Info to database column StudentID, if it matches then checkin possible otherwise restrict on checkin itself.
How can i do this in WCC via out of the box functionality or will i have to create a custom service/query for this DB validation. Please give steps in detail
Is the custom metadata field XXStudent_Info based on an option list which uses a view which is based on the table? If so, you should be able to restrict it to only valid values.

Bi publisher - querying custom user attributes

How to use custom user attributes on BI PUBLESHER reports?
xdo_user_name and other systematic user attributes are being displayed after a report is being processed by data model
Data model consists of: select :xdo_address as address from dual;
After I am expecting to have an address of a user, which is set in user attributes section.
But there is an empty space instead in report.
I searched through documentation but there are only examples of using :xdo_user_name and etc.

How to select records from multi-companies in Morphex reports?

I want to know if I can select data from multi-company in Morphex reports, for example: user wants to get report's data from CEU & CEE companies. I don't mean get the whole data from all companies, I mean to get data from specific multi-companies.
I can achieve this in SSRS reports by passing a multi-value parameter to DATAAREAID table's field.
It's seems I can achieve this by set Report's Cross-Company property and QueryRun to yes.
this.query.allowCrossCompany(true);
this.query.addCompanyRang("CEU");
this.query.addCompanyRang("CEE");
Here are some links for more details:
Cross-Company Reports in the AOT
Cross-Company X++ Code Basics

FileMaker Pro -- Filtering Relationship Not Working

I'm trying to build a FileMaker Pro 11 layout that excludes records containing a certain value. The relevant data is in table Invoice. I want to filter so that Invoice records whose "Invoice Check Grouping" field is blank are not displayed on the layout.
I've added a global field to the invoice table called "Blank Invoice Check Grouping" to use as my filter criteria. I've created a self-join relationship to the Invoice table, joining "Invoice ID" to "Invoice ID" and joining "Invoice Check Grouping" to "Blank Invoice Check Grouping". The resulting table is named "Invoice Check Groupings".
The layout which I build based on table "Invoice Check Groupings" shows all records in Invoice--it does not filter out those with blank values. What am I doing incorrectly?
Thanks,
Ben
Layouts show records in a table (or more accurately, a table occurrence) and don't directly deal with related data. As mentioned by #pft221, you can use relationships for filtering, but only when viewing data through a portal.
If you always want a particular layout to show data based on a particular find, you can do so with a script and a script trigger. First set up a script to do the following:
Enter Find Mode[]
Set Field["Invoice Check Grouping"; "*" // Find all records with any data in this field
Perform Find[]
Note that you can also embed the find request within the Perform Find script step, but I tend to script finds in the above manner as it's easier to see what the find request is in the script and variables can be used in the find request.
Now you need to set your layout to execute this script whenever it's loaded. Go to the layout and enter Layout Mode. Select Layouts>Layout Setup from the menu bar. Click the Script Triggers tab and check the box for OnLayoutEnter and select the script you wrote above. Now whenever the layout is entered, that script will run and exclude the records that have that particular field being empty.
There are many ways to filter records, depending on what you are trying to do and what you are trying to display for your users.
The most common and simple way you can filter records is through a simple Find in a list view. I'm unclear from your question, but my best guess is that you're already using a list view and misunderstanding how FileMaker's relationships and Table Occurrences (TO's) work.
To Filter with the "Find Records" method:
Create a new List View layout of any Table Occurrence of your Invoice Table -- most likely you will want to use the default Table Occurrence that FileMaker created for you when you created the table.
Place the fields that you would like to display on that layout, including the "Invoice Check Grouping" field.
Switch into Find Mode
Put a '*' character into the "Invoice Check Grouping" field
Perform the Find
You should now see a list of all Invoices where the "Invoice Check Grouping" field is not blank. (You can find additional interesting search criteria in the "Insert: Operators" drop down of the title bar.)
Now you may actually be looking to filter related records through a portal but, given that you've set up a self-join on the Invoice index on the Invoice table my guess is that, at best, this would show either 0 or 1 record for each Invoice record you display in your main layout.
To Filter Records with the "Portal Filter" method:
Let's assume, though, that you have a Client table where you'd like to see only the records with a non-blank "Invoice Check Grouping" value. The table set-up would be as follows:
Client
Client ID
[... other client info ...]
Invoice
Invoice ID
Client ID
Invoice Check Grouping
[... other invoice info ...]
With a relationship in the relationships graph:
Client::Client ID ------< Invoice::Client ID
From there you would set up a Form layout on the Client TO and create a portal showing records from the Invoice TO. From the options for the portal you would select "Filter Portal Records" and use a formula similar to:
not IsEmpty(Invoice::Invoice Check Grouping)
Finally, it's worth noting that a portal filter isn't appropriate for all display situations or calculations. You can set up a similar filter completely through your relationships graph (as I believe you have already tried to do.) This will work, once again, for viewing records through a portal but not for the records displayed by a layout itself.
The answers above don't actually help Ben with his question. They are workarounds.
I have the same problem as Ben, and I don't think there is a solution, even now in Filemaker 12. There is I think no way to define a relationship that will omit the related records where the match fields are empty.
Two options come to mind:
On a specific layout, you have more fine-grained control in the portal definition itself, and can use this to exclude the records
You can now use SQL queries to achieve this result within Filemkaer.

Resources