问题描述
如何在 ASP.Net 2.0 中使用水晶报表.任何展示如何在生产服务器上部署 Crystal Reports 的示例/教程/示例.
How to use crystal Reports with ASP.Net 2.0. Any Samples/Tutorials/Examples which shows how to deploy Crystal Reports on a production Server.
推荐答案
我自己刚刚经历过这种痛苦,这里有一些建议,希望能节省你的时间......
Having just been through the pain of this myself, here's a couple of pointers that will hopefully save you time...
MSDN 上的水晶报告 - 这里有很多好东西
Crystal Reports on MSDN - lots of good stuff in here
我应该对 Crystal Reports 使用哪种持久性方法 - 提供详细信息以及如何最好地控制报表对象的生命周期的代码示例
Which Persistence Approach Should I Use with Crystal Reports - gives detail and code samples on how best to control the lifesycle of a report object
这篇文章也提供了一些很好的建议报表对象生命周期
This post also gives some good advice around the report object lifecycle
部署... 最新的 Crystal Reports 运行时不在 64 位环境中运行,因此如果部署到 64 位服务器,您要么必须将 IIS 配置为运行 32 位模式,要么使用以前版本的运行时.我对 VS2008 分发的运行时最幸运,这可以在
Deployment... The latest Crystal Reports runtimes don't run in a 64 bit environment, so if deploying to a 64 bit server you will either have to configure IIS to run an 32 bit mode, or use a previous version of the runtime. I have had the most luck with the runtime that is distributed with VS2008, this can be found in
C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapperPackagesCrystalReports10_5
C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapperPackagesCrystalReports10_5
我注意到您使用的是 ASP.NET 2.0 - 我确定有一个 VS2005 等效的运行时.尝试让部署环境在项目的早期运行,因为它无疑会比您预期的更令人头疼.
I note you are using ASP.NET 2.0 - i'm sure there is a VS2005 equivalent runtime. Try and get the deployment environment working early on in the project, as it will no doubt cause more headaches than you expect.
最后,值得一提的是,Crystal Reports 中的标准参数屏幕仅能带您到此为止.如果您想对如何向用户呈现参数变得复杂(例如,通过使参数依赖于另一个参数的选择),您将需要滚动您自己的参数屏幕.这相当容易,因为对象模型使您可以访问您需要的有关参数的所有信息.我们已经创建了一个通用参数屏幕,该屏幕根据它所指向的报告中的参数构建自身.
Finally, one last point that has cost us some time and is worth mentioning - the standard parameters screen in Crystal Reports will only take you so far. If you want to get complex with how you present your parameters to the user (e.g. by having a parameters dependent on the selection of another parameter) you will need to roll your own parameter screens. This is fairly easy as the object model gives you access to all the info you will need about parameters. We have gone down the route of creating a generic parameters screen that builds itself according to the parameters found in the report it is pointed at.
这篇关于如何在 ASP.NET 中使用 Crystal Reports?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!