Crystal reports on Windows Azure is not getting displayed
I have written an web application in VS2010 ASP.net C#, to display Crystal reports. I moved this application to Azure Emulator. It was working fine locally. However after deploying it with Azure, crystal report is not getting displayed and not even an exception is thrown.
I have installed
- Installed CRforVS_13_0.exe 开发者_JAVA百科
- Then installed CRRuntime_64bit_13_0, on my machine sequentially.
Any input from any1 will be helpful. Please let know if you want more information.
Thanks, Tanuja
You definitely can do it. I have done it myself and even wrote a step by step blog post about running Crystal Reports on Azure.
It revolves around creating a start up task to run a crystal reports installation file on your new Azure web role instances. There are plenty of snags which I have listed so give it a try. It does work!
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:
<ServiceDefinition...>
<WebRole...>
<Startup>
<Task commandLine="AzureStartUp.cmd" executionContext="elevated" taskType="background" />
</Startup>
</WebRole>
</ServiceDefinition>
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=<name>
set azurestoragekey=<key>
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.
First create a folder in your solution named for example 'assets' Copy CRRuntime_64bit_13_0.msi in this folder. Then put the following code in your ServiceDefinition.csdef
<Startup>
<Task executionContext="elevated" taskType="simple" commandLine="assets/CRRuntime_64bit_13_0.msi"></Task>
</Startup>
This way you install the crystal runtime on the cloud server before loading your application.
Hope this works for you.
Definitely possible; we host a SL app in Azure with a report server running in an Azure VM (still in beta, we've had some connectivity problems, but pretty satisfied for a beta product). The report server runs via Windows service, and we have an installation file that handles installing the CR runtime and our service. The service then polls our db for pending report requests, then processes them as needed.
We run all of our reports as PDF, so the user simply downloads the PDF. If you're having problems displaying the report directly, you might investigate this alternative; it's worked great for us.
its not supported on Azure till now.
精彩评论