UltraWinGrid Infragistics Operations - infragistics

I have an Ultrawingrid to which I am binding some columns from the database. I group some of the columns with the Ultragrid group so that the result set
shows up like this:
Now using the ultrawincalc manager the user can add new calculated columns. Can the user choose which ultragroup the columns should be added to? Like can he choose the new column to go under any group?
Also if the Datasource is empty, can I set a "No records" message? If so how?
Thanks,
Dinesh

Well I figured out as how to do this through our code. so here's what we did.
We allow the users to add a calculated column through a wizard that leverages the ultarcalcmanager engine. We added a dropdown that lists the different ultagroups (Input, Calculated and Final). The user chooses the group in the dropdown and hits save.
The ultragridcolumn can be associated to the ultragridgroup by
Grid.DisplayLayout.Bands[0].Groups["DROPDOWNTEXT"].Columns.Add("New Calculated Column");
Regards,
Dinesh

Related

Oracle Apex - Master Detail - How to add another report region using the master detail datepicker

I have a Master Detail* report page created using the App Builder -> Create Page. The master report shows customer orders (ORDERS table). The detail report shows the products that the customer ordered (ORDER_ITEMS table).
The master report (ORDERS table) has a date column (ORDER_DATE). In the report, the date column header is a datepicker item in which you can select an dropdown of past dates to sort the report.
I would like to include another report region at the bottom of this page to show the total dollars from the range. (Ex: if a user selects Last Month, then I want the report to show the sum of the total dollars from last month).
I've been able to do this in a custom page that I've built using by adding two datepicker items.
However, in a 'pre-built' Master Detail page using App Builder, I don't see the datepicker item to manipulate.
How can I grab the datepicker item and access it's functions (to query results for the additional report) and dynamic actions (region refresh)
That column header is not a page item, it is the native column filter functionality from the interactive grid component. It's not possible to "Grab it and put it elsewhere". There are a couple of options.
Create a separate date picker item in a region above the report where the user selects the from date or range and refresh master region when values change. Make sure to disable column filtering then in the interactive grid region.
Another option is to add a dynamic sum at the bottom of the report. That is described here. Or calculate the sum and put it in a page item. The post above references an example in the interactive grid cookbook that you can use.

How to add update buttons in rows of a Oracle Apex interactive report?

I created a report and a form separately rather than creating a "report with form" in my Oracle Apex application. Because of this there are no update buttons that appear on the left of every row in the report like it does when creating "report with form". How can I add these buttons such that I can use same form, which I am currently using just to create new records, to also update records?
I am assuming the report is in Interactive Report type.
Those are the ones which are normally created for report with form.
In which case if you go under the reports attributes the first one is Link,
by default it should be set to Exclude Link column. You should set it to Link to Custom Target, then define the link to go to your page and set the Primary key item.
And on your form page you also need to set an After Header process to fetch the row and fill the page items based on the filled Primary key. Or you can do something custom here, whatever floats your boat.

How to match a e-mail from a table with dax function USERPRINCIPALNAME and let the user visualize the report in PowerBI?

I need to hide a page from a group of users, but I've read that there is no RLS-like service to do that. I found a "tip" to use a card and paint it white or transparent to hide the page contents. It would work fine for me, but here is my problem:
I have a table with page name and the e-mail of the users allowed to access its contents. I need to query that table, returning the page name when the e-mail equals to USERPRINCIPALNAME (DAX function), but I haven't found how to link these information.
I tried to create a column named "allowed", comparing the e-mail value with this DAX function, but PowerBI does not allow its use (it can only be used with Measures). Then, I tried to create a measure comparing both values, but I cannot access the table value (it's not displayed in the list of available options).
What can I do? Any clues?
Regards
There is in fact RLS feature with Power BI that can be used to restrict data access for given users.
Refer: https://learn.microsoft.com/en-us/power-bi/service-admin-rls

How to apply dynamic Row level Security based on Username and location?

This is related to Row-level security in Power BI. Here is a dummy table on which I want to implement this RLS.
The RLS formula I am using right now is -
[location] = LOOKUPVALUE([location],[login],USERPRINCIPALNAME())
My end requirement is to make this RLS work on the case where if a user logs in he should see the data if the location he is in and also should see other users who are in the same location.
But lookup is throwing an error:
A table of multiple values was supplied where a single value was expected
Also, a single user can have access to multiple location and a single location could have multiple users.
How I can achieve this level of Row-level security using either Lookup or using any other possible way?
Your requirement can also be done through this way, you need to work on both the Power BI desktop and app server to get this right.
In Desktop
Power BI Desktop allows you to create Roles.Click on Manage Roles
and then click on Create New Role.
You would need to create Roles based on the Location here.
For Example Create a rule Called as Location A and click on the
table and give the formula to filters on that table. For example,
[Location] = "A".
So, you can create 'n' number of roles like this and then publish the dashboard.
App.PowerBI.Com
Now, Open app.powerbi.com and then go to the corresponding dataset and
right click on it, select security - you will find the groups there.
On the Groups, enter the emailid's that should have access to it.
You can add a person in multiple groups, that will allow them to see
more than one group.
Testing
Desktop allows you to test it as well - you can click on view as
roles, to see what the user in that group sees.
Also to remember, only people who have access to the dashboard will be able to see the data inside it. So, you will need to share it with them and as well as need to add them inside the groups. If you fail to do one of it, then they won't see anything on the dashboard.
Most efficient Method
This is a better method and I think this is the one you are asking for,
[login] = username()
The function username() automatically gets the email address of the user that is logged in.
Create the above mentioned filter on the new role in the required table.
This way, you would still be adding those 50000 users manually inside the roles under the security section of the corresponding dataset.
But If they all belong to a particular group in an organization, and your Office-365 team has configured your back-end in the right way, then you will only need to enter the group.
But most companies don't have this configuration on their back-end as it is very difficult to control the data security.
Change the Data Model
To do your requirement, you also need to change your data model.
You will need to have two tables initially.
The Value Table - You can have many columns like name and all in there, but it doesn't matter.
The Email Address Table For Location as your second table.
Now Merge the Locations from Value Table to Email Address Table and that will be your final Table. Use this for visualizations but please be very clear on DAX - as you may have duplicate rows and different values.
Now Create RLS on this Table. It should work.
As the name goes, Row Level Security is applied on each rows. So, the formula will be evaluated for each row individually. So, your only option is to have a flat table with all the values.
I answered a question very similar to this one on another page. I will copy it here because I added a bit for the lookup function.
Embedded Power BI: Add Multiple Users in Row Level Security and assign different roles
If you have more than one data to filter against in a role, pass the list as a string path to RLS, parse it into a table, then return the row when it matches with a value in the column.
We do this if we are not actually passing username, but for cases like multiple sales offices, or making a view that compares data from multiple user accounts, or when a user belongs to different hierarchies in an organization, or basically any time you want to use multiple filters..
example input using sales ids
//Username() = "020104010|020104061|020104303|020104304"
//DAX
var userIds = Username()
VAR tbl=
GENERATE (
GENERATESERIES(1,PATHLENGTH(UserIds),1),
ROW ( "Key", PATHITEM ( userIds, [value]))
)
VAR valueList =
SELECTCOLUMNS ( tbl, "Key", [Key] )
return [sales_id_column] in valueList
If you need to add lookup functions, you can apply it when the ROW() statement is called.. it will look like this:
VAR tbl=
GENERATE (
GENERATESERIES(1,PATHLENGTH(UserIds),1),
VAR CurrentKey = [Value]
RETURN
ROW ( "Key", LOOKUPVALUE(Table[c1],Table[c2], PATHITEM ( userIds, CurrentKey )))
)
There is also a case when the table has a many to many relationship and cannot use multiple roles as identity. Or for this case specifically when you only want to use one role to filter many tables. In that case the username looks like this:
Username() = "Username:Bob|Location:A|Location:C"
The code will have an extra step to parse the inner path after you change the ":" to a "|". Then use a if conditional to check if the current table filters for this role. This approach supports a claims-based authorization where only one role needs to be created in RLS and everything can be done client-application side.
runtime is O(k(n log m)) where m is the number of claims you have applying RLS in the current table, n is the number of rows in the table, and k is the number of tables you are applying RLS on

Power Bi: Link Tables

In power bi, I have a table Customer in which I am keeping the Id, name and other details of customer. I have another table named Customer_CustomerRole_Mapping which contains CustomerId and its CustomerRoleId. I have another table name CustomerRoles which contains name and id of each role.
CustomerRoles and Customer_CustomerRole_Mapping are linked together.
In Power Bi, I want to show customers count role wise in a pie chart? I tried but I am unable to apply linkage between these tables. I am new to Power Bi.
Your Tables:
Customer
Role
CustomerInRole
The Table "Customer" is not necessary for your Report because you only need to know the count of rows in "CustomerInRole" per row in "Role". So just add a pie chart, use the name of the role in the axis (or legend) and the (distinct) count of Field "CustomerIDs" in "CustomerInRole"
That is all you need ;-)
please find table relation is one-way or two-way . if it is complex and you are going for two way then it will not show.
To have things clear I would add the role to your customer's table. There's no use in keeping things in a relational way when you start playing with BI.
This can easily be done in the query editor. On the home tab, click "Edit Queries"
And there you'll have to click "Merge queries", also on the home tab completely on the right.
In the upper table you select the CustomerID-column and Customer_CustomerRole_Mapping table, select the right ID for that table. After clicking "Ok" you can expand the new columns (by right clicking the merged query-column). You will have to repeat this step to add the roles to the Customer table, but in this second round you will have to work with selectint the roleId's.
After all this you can delete the columns that you don't need anymore from this table and just keep the role.
In the pie chart you then just add the role and select "Count".
It is handy to solve it like this when you have other Fact-tables, and you want to use Role as a Dimension.
You can be linking of tables in power bi desktop go dashboard and click on the third menu as showing in image Relation Management data table image whatever you want make relation with table just drag and drop to link within multiple and single tables with parent and child tables and if you want to delete this relation just go on relation arrow(line) do right click on line and delete it and save file.
Cheers.