Out of control cell height in Reporting Services

I was in working Reporting Services and one of my cell kept growing to be humongous. Only one cell, and only if I included the value from a certain table. So imagine you have this setup:

SELECT c.Name, o.OrderId, p.ProductName
FROM Customer c
ON o.CustomerId = c.CustomerId
INNER JOIN Product p
ON p.OrderId = p.OrderId

Very advanced stuff here.

I had a basic Tablix, and when I included all the fields, the table containing ProductName grew to prodigious height. Pages were consumed by the evil cell as it tried to take over the world. I tried restricting the size, trimming the data in the report, and trimming the data in the query – nothing worked. But when I excluded that field from the query, everything looked fine.

The problem was my query. If you didn’t notice the error in the query, look at the last line:

ON p.OrderId = p.OrderId

Oops. Once I changed the query to what it should have been:

ON o.OrderId = p.OrderId

All was well – the cell no longer had a height of a scazillion. So if you have an out-of-control cell, make sure your query doesn’t suck like mine did.

  1. Leave a comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: