在日华人IT论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 1065|回复: 0

部署水晶报表到服务器

[复制链接]
发表于 2012-5-17 19:47:32 | 显示全部楼层 |阅读模式
Deploy Crystal Report Asp.Net Application on Server
http://niitdeveloper.blogspot.jp/2012/03/deploy-crystal-report-aspnet.html

This article deals with issue faced by most of developers while deployment of crystal report web application on server (or on remote server). I googled lot for same issue but information was scattered. And most it was not explaining exactly how to do?

Before I start I would like to make excuse that I'm not so much well versed with CR. But still I can share collectively that can help anybody in deployment. This article deals especially with Crystal Report Assembly version 13.0.2000.0 (CR for VS 2010). But I hope it would work in any other case.

1. When we develop CR application on development server and tests it works fine. Because on local server assemblies required are available to application. Let us take look over code snippet of web.config, which shows assembly added for CR:

?
1
2
3
4
5
6
7
8
<ASSEMBLIES>
                <ADD assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
                <ADD assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
                <ADD assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
                <ADD assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
                <ADD assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
            </ADD>
</ADD></ADD></ADD></ADD></ASSEMBLIES>




So these assemblies are referenced from GAC (Global Assembly Cache). But if you try to deploy same application on remote server, the application throws errors of different types because same assemblies are not there in GAC.

Many sites and knowledgeable developers share that by installing appropriate CR runtime on remote server, the problem gets resolved. You can download same according to requirements at Crystal Reports v. 9.1 to CRVS2010 Runtime Distribution.

2. If you don't have access to remote share then you might have problem in implementing above mentioned solution. In that case you can just copy necessary dll's required by your application in bin folder. And it will work fine.

When we install CR for VS 2010 on PC, the assemblies needed for application gets copied to directory C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet
. As we have seen in above Web.config assemblies named, just copy those assemblies in Bin folder from above directory, and then remove the assemblies element from web.config.The application would still work nicely.

3. Sometimes application would still not work due to reasons. Solution for same:
(a) Set FULL TRUST permission on root folder.
(b) LOCAL SERVICE permission must be set on application pool.
(c) Make sure the aspnet_client folder exists in root folder.
(d) Grant modify permissions on C:\Windows\Temp from your web application or other way as CR uses that folder for storing files to display reports.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|在日华人IT论坛

GMT+8, 2024-10-18 20:28 , Processed in 0.034596 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表