Archive for the ‘Software Stuff’ category

Crystal Reports in .net 4 windows application

December 25th, 2011

Ran into issues with my application not compiling due to the following error:

“Could not load file or assembly ‘file:///C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86dotnet1crdb_adoplus.dll’ or one of its dependencies. The system cannot find the file specified.”

Thanks to a post on msdn’s forum I found the following fix:

1. Make sure your project framework is set to 4.0 framework, not the client

2. Add this to the config file:

<startup useLegacyV2RuntimeActivationPolicy=”true”>
<supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/>

3.  When distributing the app be sure to include the  appname.config.exe file



Create XML file from SQL Data

November 14th, 2010

Thanks to an article on I found a quick and easy way to create an XML file from data in a sql database.  I adapted his article and came up with this example.

select ( Select * from table for XML PATH(‘SAMPLEXML’),
Form XML Path(”),