为什么水晶报表查看器总是要求登录信息在操作系统WEPOS Access数据库? [英] Why does Crystal Report Viewer always asks for login details to Access database on WePOS operating system?

查看:131
本文介绍了为什么水晶报表查看器总是要求登录信息在操作系统WEPOS Access数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了使用链接到Access数据库其中,C的Crystal Reports XI报告:\MyData.mdb

I wrote a report using Crystal Reports XI linked to an Access database here C:\MyData.mdb.

报告中有一个字段(简化这个例子),并没有子报告。

The report has one field (simplified for this example) and no sub-reports.

我已经使用了表格和使用WPF Cyrtsal报告查看器C#.NET 4。

I have used the Forms and WPF Cyrtsal Report Viewer using C# .NET 4.

成功报告的意见我运行Windows XP开发的PC上,其他钱柜,也运行Windows XP。

< STRONG>然而,在运行到WEPOS(类似的削减Windows XP中)报告永远显示一个对话框,询问登录信息,即用户名和放大器; 。密码

这对话框也显示了正确的路径为C:\MyData.mdb

This dialog box also shows the correct path to C:\MyData.mdb.

我花了这个多天,在每一个可能的方式测试(我敢肯定,每个人都记得次这样的!)。

I have spent many days on this, testing in every way possible (I'm sure everyone remembers times like these!).

我用这个代码,以确保该数据库是正确链接到:

I use this code to ensure the database is correctly linked to:

TableLogOnInfo logonInfo;

foreach (CrystalDecisions.CrystalReports.Engine.Table table in report.Database.Tables)
{
    logonInfo = table.LogOnInfo;
    logonInfo.ConnectionInfo.ServerName = string.Empty;
    logonInfo.ConnectionInfo.DatabaseName = "C:\MyData.mdb";
    logonInfo.ConnectionInfo.UserID = string.Empty;
    logonInfo.ConnectionInfo.Password = string.Empty;
    table.ApplyLogOnInfo(logonInfo);
}



...它适用于Windows XP的每台PC上,除了一与WEPOS

... and it works on every PC with Windows XP, except the one with WePOS.

我也打了:

report.SetDatabaseLogon(string.Empty, string.Empty, "C:\MyData.mdb", string.Empty);



...但是这没有什么区别。

... but It makes no difference.


  1. 有Access数据库中没有用户名或密码

  2. 所有PC的使用已安装的卫浴套间软件(运行时间等)

  3. 所有PC的使用管理员帐户(和文件权限进行双重检查)

  4. 我试过滴答作响的集成安全性复选框,没有运气测试

  5. 我设置logonInfo.ConnectionInfo.DatabaseName =的String.Empty;

  6. 我设置logonInfo.ConnectionInfo.ServerName =C:\MyData.mdb

  7. 我曾尝试不使用任何上面的代码,而不是只是做确保数据库是在所有PC的同一个地方,没有运气

  8. 这是一个Access 2003数据库文件

  1. There is no username or password on the Access database
  2. All the PC's used have the releveant software installed (runtimes, etc.)
  3. All the PC's were tested using the Adminstrator account (and file permissions were double checked)
  4. I've tried ticking the Integrated Security tick box, with no luck
  5. I set logonInfo.ConnectionInfo.DatabaseName = string.Empty;
  6. I set logonInfo.ConnectionInfo.ServerName = "C:\MyData.mdb";
  7. I have tried NOT using any of the above code, instead just made sure the database was in the same place on all PC's, with no luck
  8. It is an Access 2003 database file

我只能得出结论WEPOS是如此砍掉了水晶是默默未能通过认证......请大家帮忙!

I can only conclude WePOS is so "cut down" that Crystal is silently failing to pass authentication... please help!

推荐答案

只是以供将来参考,如果你切换到SQL Server,你会希望使用SQL OLEDB和的的本地SQL客户端,否则你会再次遇到同样的问题,因为我当我第一次整合到CR我们的应用程序也做了。它将工作在开发机器上而不是在生产精细。

Just for future reference, if you ever switch to SQL Server you will want to use SQL OLEDB and NOT the native Sql Client or you will run into the same problem again as I also did when I was first integrating CR into our app. It will work fine on your development machine but not in production.

这篇关于为什么水晶报表查看器总是要求登录信息在操作系统WEPOS Access数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆