简体   繁体   中英

Crystal Reports login error

I created a report via crystal report. It works on my pc. Database field is null . But when I tried to run on another pc then a window opens. The window has 4 textbox (2 readonly 2 editable)

Server*     192.168.1.2
Database* 
UserName   myusername  +
Password   mypassword  +

(*) places are read only and + places are editable. But i can't change database name . I think the problem is it but i can't understand how can I solve this. I haven't got any problem on my pc. Problem is only on other computers. I setted up crystal reports runtime editions on these computers.

The problem is Datasource settings on your report. Not sure how you are setting those in your code. Refer these links that display how to set it:

// 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!!

There are other examples available:

Web Crystal reports produce Database logon failed

[Failed in Production]

If you still have a problem, post your code of how you are setting datasource for your report.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM