Jbo-25089: Too many matching records found. Specify additional criteria to limit the number of records - performance

I have a LOV in the UI. Upon clicking it, it shows the values in it. Upon selecting a particular value in that LOV, the error pops up saying that:
Too many records found with matching criteria.
This happens only for the first value that I am selecting from the LOV. If I select a different value from the LOV again, this error doesn't appear.
The range size of the iterator that this LOV uses is 25. I have used the preferred tuning settings in the VO to which the LOV belongs. Please help me in understanding why this is happening.
Thanks in advance.

It occures when there is a duplicate record in viewObject for same attribute, Is there any other record in that VO ?

Related

BIRT suppress multiple duplicate columns

I am working on a BIRT report. Its records are grouped on the basis of the status column. I was looking for an option in the Eclipse BIRT tool by which I can hide combinations of multiple columns in a row which are repeating. I have attached screenshots for both the current report and the expected report structure.
I tried the "suppress duplicate" option but that is limited to a single column. I am not able to apply this on multiple columns together. I couldn't figure out any other option. Please suggest any solution in the tool or do I need to change my query to return the result in the expected format?
Actual Result:
Expected Result:
There are three obvious ways to hide duplicate values.
All of these require you to configure this per column (BTW I don't understand why you consider this to be a problem).
As you already did: Use "suppress duplicates" at the column level.
Add more groups to your table after the existing group.
E.g. one group for the first column (whatever that is).
Then you can choose "Drop" "detail" in the properties of the corresponding group header cell. It's a bit difficult to get the layout right this way.
In your data set, if it's SQL, you can use a little construnct with CASE and the LAG analytic function to compare the column value to that of the previous row, and if they are equal, return NULL instead (pure SQL solution).

Limiting rows initially returned in select list

Populating an Apex 5.1 select list of employees with about 25,000 names is proving to be a performance problem when loading the page. Is there a method of limiting the initial list to a set number (such as 200), and dynamically populating with chunks of additional names as the user scrolls through the list? Are there other options I should consider that would not slow down the page load?
I am currently using a dynamic LOV, and have tried adjusting this LOV to include Oracle row limiting code; however, there is no way of fetching past the initial set of rows. The source of the data is a view on a materialized view.
I appreciate any ideas
I'd use a pop-up LOV with a search function, not showing any records until the user enters a search value (more than 3 characters). I know it's tedious to use a pop-up LOV but it seems the only way to prevent waiting for a slow list to display.
I'd try with cascading lists of values. I don't know what those 25.000 names represent, but - suppose it is a large company. Then you'd
1st LoV: continent
2nd Lov: country
which refers to the previous LoV as where country.continent = :P1_CONTINENT
3rd LoV: city
which refers the previous LoV as where city.coutry = :P1_COUNTRY
4rd Lov is actually your current query:
which refers to the previous Lov as where person.city = :P1_CITY
Now your list of values wouldn't contain 25.000 rows, but - hopefully - a lot less.

Best practices for adding/editing UI table data while filtering

Does any one know If there are any best-practices for editing/adding data in UI table while its data is filtered?
Example 1:
Suppose we have a table with two options: add new record and edit selected one. Moreover, the table has an option to filter data over column A.
Now, if the table is filtered by filtering column A with value '1' and I want to add a new record with value in column A that matches filter requirements, what should happen:
The table should refresh and display filtered records with selected newly added record.
The table should reset filter and show all records witch new one selected.
The table should do nothing and display filtered records as they were. Newly added record will be displayed when the filter resets.
For me intuitively the best solution is number 1. But then how to solve the problem in example number 2:
Example 2:
If the table is filtered by filtering column A with value '1' and I want to add a new record that in column A has value '2' what should happen:
The table should display filtered records with selected newly added record despite it does not matche the filter.
The table should reset the filter, and all records should be displayed with new one selected.
The table should do nothing and display filtered records as they were.
The same story is when we have filtered records, and in selected record we want to edit value upon which the filtering took place. Does the edited record should than disapear or filtre should be reset?
Or maybe the best way is to disable add/edit operations while filter is on?
I don't know if there is any best practices about it but I have also encountered the problem before. Two different solutions as I came up with:
Edited/Inserted record should not be filtered until the next time a filter is applied or filter is reset. The record should also be shown different (i.e. darker background color, or an icon, or tooltip) than others implying it was edited and is not being filtered.
The record should be left in focus after being edited or inserted. As soon as it loses focus, filter should be applied to it. The ideal solution is if the record is filtered out, it shouldn't immediately go out of vision. For instance it may go invisible with an animation.
I just checked the google docs and libre office, both of them just display the new record regardless of the filter. You need to re-apply the filter to hide them from view (in both cases the column "A" is filtered by "value 1"):

IIF Statement in TablixFilter issue

I'm trying to filter a matrix in my report. I have names of 4 drivers and I want the Matrix5 to show the name of a default driver in case SELECT ALL is checked in filter. Otherwise I want the matrix to show whoever is checked.
I set an expression at matrix filter as;
=IIF(Parameters!Sofor.Count=4,"abcdef",Parameters!Sofor.Value)
-abcdef is the name of the default driver for the tablix
-Sofor is the driver name parameter and has 4 total possible name options, 5 if we consider SELECT ALL too.
It works well if I check SELECT ALL but stops working if I select only one option.
Error I'm getting is as follow;
"The processing of FilterExpression for the tablix "Tablix5" cannot be performed. Cannot compare data of types System.String and System.Object[]. Please check the data type returned by the FilterExpression"
Though the error sounds pretty self explanatory I still can't understand what I'm doing wrong. Any help please?
Parameters!Sofor.Value is an array of values (the object) because its a multi-select parameter. (what happens when the user chooses 2 drivers?)
Try
=IIF(Parameters!Sofor.Count=4,"abcdef",Parameters!Sofor.Value(0))

Browse field data shows value, but displays another value

I have a formula written for a field in Crystal Reports. When i refresh the report, i get a different value from the formula. The required value is always the last value in Browse Field Data dialog for that formula.
Isnt the formula supposed to have only one value as output? why are multiple values shown in browse field data dialog.? Is there a way to retrieve last value of Browse File Data dialog?
My formula looks like below:
WHILEREADINGRECORDS;
NumberVar CODTOTAL;
if {XXX.YYY} = 1 then
( CODTOTAL := CODTOTAL + {XXX.ZZZ};
);
CODTOTAL;
Browse field data shows all the values "CODTOTAL" acquires as a result of that formula and displays a random value amongst the assigned value.
Please help me out. I am amateur in crystal reports.
Any help would be highly appreciated.
~Regards.
First observation should be where have you placed the formula (Details, Footer.. etc).
why are multiple values shown in browse field data dialog.?
Browse field shows the data that is present in the table but in your case you are applying "If" condition of the filed. It can be possible that there is only one record that satisfies your condition.
I would suggest to run the report without the codition, Check the results and apply the condition and check results again.

Resources