Reporting Services 2008R2 throws “native compiler error [BC30494] Line is too long.”-Collection of common programming errors

An unexpected error occurred while compiling expressions. Native compiler return value: '[BC30494] Line is too long.'.

When RS throws this error, the typical scenario appears to be that there are too many text boxes on a specific data region; and the only known measure seems to be to ‘minify’ text box names (ie. rename TextBox345 to T345).

My report is not that large (2500 Lookup() calls).

So my guess is that the VB code-behind that gets generated for the Lookup() function is quite verbose and therefore breaks the 64K limit for a generated VB code block per data region.

  1. Can I test my hypothesis? Ie. is there a way I can inspect the generated VB code?

  2. Any suggestions as to how to fix/dodge this problem? Needless to say that using abbreviated names in my case didn’t cut it.