Reporting Services error: Failed to enable constraints

I was creating a report using Microsoft Reporting Services when I ran across this error:

Failed to enable constraints. One or more rows contain values 
violating non-null, unique, or foreign-key constraints.

That’s not too terribly helpful, is it? So I went in search of something to make sense of this error. A Bing search took me to “Castner IT Blog” and there it was, bullet point number 1, the solution to my problem:

Check if you have changed the length of any fields in the underlying database table after creating the dataset. If you have, you may need to manually change them in the dataset as well. If you are using Visual Studio 2008, open the xsd file and click on the relevant field name. Ensure the maxlength property matches your new field length.

I had, in fact, updated the stored procedure used as a data source for that report, and that update had changed the maximum size of the data being returned.

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: