Thursday, October 25, 2012

Microsoft SQL Server Reporting Services - The value of the Top property for the text box "Textbox1" is negative. Negative sizes are not allowed

Microsoft SQL Server Reporting Services - The value of the Top property for the text box "Textbox1" is negative. Negative sizes are not allowed

This happens to me quite often and it has kind of become so easy to resolve. Usually when I work on reports, I happen to click on a lot of objects (text boxes, matrices, etc). Oft times the mouse slips and some odd object somewhere moves slightly out of position. 

Before we continue any further, let me highlight that I've tried reproducing this error in "Microsoft SQL Server Report Builder 3.0" and fortunately the "Report Builder" won't even let me get away with the mistake. However things are a little bit different in Visual Studio.

Usually when you try to deploy a report from Visual Studio, you'd get an error message like "The definition of the report "ReportName" is invalid." When you try to preview the report you then get a more descriptive error message like "An error occurred during local report processing. The definition of the report "ReportName" is invalid. The value of the Top property for the text box "textbox1" is negative. Negative sizes are not allowed."


Microsoft SQL Server Reporting Services - The value of the Top property for the text box "Textbox1" is negative. Negative sizes are not allowed


What you need to do is locate the "textbox1" in your report and make sure it's selected, then go to the properties. Look for the position property which actually lets you specify the distance of your object from the containing/parent object. Probably the "top" property is a negative size, maybe something like -0.00004mm or -2mm, whatever the case maybe, change that value to a positive number or just make it zero, anything but a negative number.



Microsoft SQL Server Reporting Services - The value of the Top property for the text box "Textbox1" is negative. Negative sizes are not allowed

Thato Mantai