I have a report, with configured Row Level Security rule. In most cases it works well, but for some users the report is get messed up.
The Row Level Security rule is simple: [UserName] = USERNAME() . For testing purposes, I set it [UserName] = „the name of the user” - but it gives the same result.
//We have about 20K rows, with RLS filtering about 13K rows should be displayed.
For the other users that have 3-5k rows the report works well, but I couldn’t find any relations between this behavior and the amount of data.
I don’t know if it is important, but other users – who have access to 3-5K rows – the report works well. In spite of this I cannot say that the count of the rows is related to this issue.
- Without any filtering the report is OK.
- Without RLS filtering, but setting the same filter options in the page level filters, the report is OK.
- With RLS filtering (even with USERANAME() or constant string) the report is messed UP.
- With RLS filtering and setting the same filter options in the page level filters, the report is messed UP.
- With RLS filtering, but without calculating the Total value, the column looks good, but another column gets messed UP.
- With RLS filtering, but setting page filters to show only a few rows, the report looks OK.
The data behind the report is generated, in some rows the strings are long (1-2k characters) and the type of numbers are decimal(38,19). I gave a shot to convert all the string to varchar(255) and all the numbers to integer, but nothing changed.
Could you please help me to solve this problem?