我在PC-A、Windows 10、Oracle11g在Pc-B上使用VN.NET 2015 Windows 10和Oracle11g。
我发布了安装包并在PC-B上运行,它运行良好,与数据库连接,但报告不起作用,我收到消息:
“crystaldecisions.shared.sharedutils”的类型初始化程序引发了一个异常
这些是应用程序文件文件夹中包含的dll.deploy文件:

请告诉我如何解决这个问题。



更新的


发布于 2019-03-12 10:54:07
只需在web.config/app.config文件中为凭证代码和实际凭据值添加代码即可。之后,使用新的凭据发布和部署,CR会在运行时自动更新它。
ConnectionInfo crconnectioninfo = new ConnectionInfo();
ReportDocument cryrpt = new ReportDocument();
TableLogOnInfos crtablelogoninfos = new TableLogOnInfos();
TableLogOnInfo crtablelogoninfo = new TableLogOnInfo();
Tables CrTables;
crconnectioninfo.ServerName = "localhost";
crconnectioninfo.DatabaseName = "dbclients";
crconnectioninfo.UserID = "ssssssss";
crconnectioninfo.Password = "xxxxxxx"; 检查以下链接:How to set database login infos (connection info) for crystal report?
How to stop crystal report viewer from asking login credentials when opening subreport
https://stackoverflow.com/questions/55060948
复制相似问题