Crystal reports on Windows Azure is not getting displayed-Collection of common programming errors

I just went through the same problem of getting Crystal Reports 2010 (13.0.4) working on Azure. I followed the advice of BritishDeveloper and some other sources. My method differs only slightly in that I used Azure blob storage to store the crystal runtime which makes project publishing a lot faster than when including it within your project.

Here’s how I got crystal reports working:

1) Set up a new blob storage service within Azure portal

2) Upload the Crystal installer to this blob storage

Using the free tool CloudXplorer upload CRRuntime_64bit_13_9_4.msi into a container called crystalinstaller (remember to unzip before uploading).

3) In Visual Studio create a startup script definition in your Azure project ServiceDefinition.csdef:


  
    
      
    
  

4) Store the following startup script in the root of your web project with ‘build action’ none and ‘copy to output’ set to always. Lesson learnt here: the approot/siteroots isn’t always on E: drive

@ECHO off
@REM Setting up Azure Stroage Credentials
set azurestoragename=
set azurestoragekey=
set storagecontainername=crystalinstaller

@REM Setting up Azure Drive 
@REM (sometimes E:, sometimes F: maybe one day G:?)
set drive=%cd:~0,3%

@REM Download Crystal Runtime 13.0.4
@REM from blob storage account
set filename=CRRuntime_64bit_13_0_4.msi
AzureBlobDownloader.exe "%azurestoragename%" "%azurestoragekey%" "%storagecontainername%" "%filename%"

@REM Install Crystal Runtime 13.0.4
msiexec.exe /I CRRuntime_64bit_13_0_4.msi /qn

@REM Copy Crystal Reports Viewer Files
robocopy D:\inetpub\wwwroot %drive%sitesroot\0 /S
robocopy D:\inetpub\wwwroot %drive%approot /S

5) Download a command line tool that can download from blob storage to your azure service VM I used packagedownloader.exe from Windows Azure Tomcat Solution but there are probably others or you could easily roll-your-own. I renamed this to AzureBlobDownloader.exe and copied along with the included Microsoft.WindowsAzure.StorageClient.dll into the root of my web project again with ‘build action’ none and ‘copy to output’ set to always.

If you’re still having trouble try to remote desktop into your instance and use a tool like DebugView to monitor what’s happening.