2014-10-08 136 views
0

我通过水晶报表创建了一个报表。它在我的电脑上运行。数据库字段为空。但是当我尝试在另一台电脑上运行时,会打开一个窗口。该窗口有4个文本框(2只读2编辑)Crystal Reports登录错误

Server*  192.168.1.2 
Database* 
UserName myusername + 
Password mypassword + 

(*)的地方是只读的,+地方编辑。但我无法更改数据库名称。我认为问题是这样,但我不明白我该如何解决这个问题。我的电脑上没有任何问题。问题只出现在其他电脑上。我在这些电脑上设置了Crystal Reports运行时版本。

回答

1

问题是报表上的数据源设置。不知道你是如何设置你的代码。 请参阅这些链接,显示如何设置:

// Create a new customer orders report. 
CustomerOrdersReport report = new CustomerOrdersReport(); 

// Get the report data. 
DataTable customersTable = getCustomersData(); 
DataTable ordersTable = getOrdersData(); 

// Set datasources. 
report.Database.Tables["Customers"].SetDataSource(customersTable); 
report.Database.Tables["Orders"].SetDataSource(ordersTable); // Don't forget this line like I did!! 

还有其他的例子可供选择:

Web Crystal reports produce Database logon failed

[Failed in Production]

如果仍然有问题,发布您的代码如何您正在为报告设置数据源。