Friday, February 17, 2012

An error has occurred during report processing. Exception has been thrown by the target of an invocation. Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Yesterday I was using RDLC to create a matrix report and encountered by this problem
 "  An error has occurred during report processing.
        Exception has been thrown by the target of an invocation.
            Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."
Basically this problem arises if a primary or foreign key defined in Table Adapter of DataSet which is used as Data Source for Report.
To resolve this just go to the relevent dataset and search for the primary key and just delete that.


Hope this will help you.

2 comments: