SetDataSource and “Load Report Failed” in Crystal with .NET 2.0

Okay this was an obscure problem. Luckily, I found the solution quickly enough in this long MSDN forum thread.

The problem was that when I was trying to print the same report multiple times in an app, the 2nd time would always throw the error “Load Report Failed” on the SetDataSource command of my report.

This was happening to me in design time only. Fortunately, not at runtime.

The solution? Are you sitting? You must have something in the Company field of your assembly info. Not just spaces. Not just periods. But real text.

Yup that’s the solution. A caveat – this may not be the only solution and not be the solution for every scenario. But it has thus far made the problem go away. If it returns, I’ll be sure to edit this post.

The reason that I was seeing this in design time, not runtime, was because it was being thrown from an assembly that was not the main executable assembly. The exe assembly had the assembly info all filled out. But in this class assembly, which was being checked during design time, it wasn’t.

Go figure.



Don’t Forget: www.acehaid.org

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.