Simply list report error

Hi,

I have created a new view in the database, added view rights and then, created a simple list report to show its data.
Manager shows the report as I expect with the report preview, but when I try to see the report from the IT Portal this error is shown:
    
Error while loading the collection in ListReport.
Error while inserting the object 010b4ee4-2cae-4b3f-9489-5e9a38910202.
The primary key condition was violated in the collection .

I dont understand this error. Can you help me?

(OneIM v.8.1.1)

Regards

Parents
  • Hi

    Did you define a primary key for the view?

  • No, can a view have a primary key?

  • Yes, you can define it from within Designer under the option where you can see the tables. Its possible to select column(s) to define a composite key as well.

  • I obtain the same error after creating a composite key for my view.

  • Sorry not sure then what could be the issue, I suggest you debug in the front end and see what is being loaded in the collection if it gives a hint.

  • Hi,

    here the log, CCC_OrgAndGroups is our custom view.

    2021-05-05 16:17:45.3381 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) : CCC_OrgAndGroups: Getting collection, load type: Slim
    2021-05-05 16:17:45.3381 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) :     ClaimConnectionAsync - read write, _transaction == null
    2021-05-05 16:17:45.3381 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) : -- Connection 2 switched from Available to Working after comparison
    2021-05-05 16:17:45.3381 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) : --> existing connection 2
    2021-05-05 16:17:45.3538 DEBUG (    SqlLog wbn2jowndk3fszsbewkp3yni) :     (5 ms) - select UID_Org from CCC_OrgAndGroups
    2021-05-05 16:17:45.3693 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) : -- Connection 2 switched from Working to Available
    2021-05-05 16:17:45.3693 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :     Collection: Run statement and fetch data done in 19ms.
    2021-05-05 16:17:45.3693 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :     Collection.Count: 5050
    2021-05-05 16:17:45.3693 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :     Getting collection done in 20ms.
    2021-05-05 16:17:45.3693 DEBUG (    WebLog wbn2jowndk3fszsbewkp3yni) : Load collection  in component ListReport
    2021-05-05 16:17:45.3693 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :     CCC_OrgAndGroups: Getting collection, load type: ForeignDisplaysForAllColumns, LoadForeignDisplaysEvenWhenExpensive
    2021-05-05 16:17:45.3693 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) :         ClaimConnectionAsync - read write, _transaction == null
    2021-05-05 16:17:45.3693 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) : -- Connection 2 switched from Available to Working after comparison
    2021-05-05 16:17:45.3693 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) : --> existing connection 2
    2021-05-05 16:17:45.4005 DEBUG (    SqlLog wbn2jowndk3fszsbewkp3yni) :         (37 ms) - select * from (select Ident_Org, System, cn, UID_Org from CCC_OrgAndGroups) as x ORDER BY UID_Org OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY
    2021-05-05 16:17:45.4005 TRACE (    SqlLog wbn2jowndk3fszsbewkp3yni) : -- Connection 2 switched from Working to Available
    2021-05-05 16:17:45.4005 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :         Collection: Run statement and fetch data done in 38ms.
    2021-05-05 16:17:45.4005 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :         Collection.Count: 20
    2021-05-05 16:17:45.4005 DEBUG ( ObjectLog wbn2jowndk3fszsbewkp3yni) :         Getting collection done in 39ms.
    2021-05-05 16:17:45.4005 TRACE (    WebLog wbn2jowndk3fszsbewkp3yni) : INSERT  
    2021-05-05 16:17:45.4005 DEBUG (    WebLog wbn2jowndk3fszsbewkp3yni) :     Load collection  in component ListReport done in 40ms.
    2021-05-05 16:17:45.4161 ERROR (    WebLog wbn2jowndk3fszsbewkp3yni) : System.AggregateException: One or more errors occurred. ---> VI.Base.ViException: Error while loading the collection  in ListReport. ---> VI.Base.ViException: Error while inserting the object 010b4ee4-2cae-4b3f-9489-5e9a38910202. ---> VI.WebRuntime.WebRuntimeException: The primary key condition was violated in the collection .
       at VI.WebRuntime.DbObjectStore.<InsertRowAsync>d__46.MoveNext()
       --- End of inner exception stack trace ---
       at VI.WebRuntime.DbObjectStore.<InsertRowAsync>d__46.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at VI.WebRuntime.DbObjectStore.<ApplyLoadOptionsAsync>d__51.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at VI.WebRuntime.DbObjectStore.<AddEntitiesAsync>d__53.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    Regards

  • hi again,

    I have just seen that the report is correctly generated and sended by suscription.

    Regards

Reply Children
No Data