The code snippet below works absolutely fine on my development PC and another users PC.
The application was installed to the other users PC using 'ClickOnce'.
ReportW开发者_开发问答indow reportWindow = new ReportWindow();
Reports.rptDrawAmountSummary rpt = new Reports.rptDrawAmountSummary();
rpt.SetDatabaseLogon(clsArbitrageDB.userID, clsArbitrageDB.password);
reportWindow.crystalReportsViewer1.ViewerCore.ReportSource = rpt;
When I attempt to run the application installed (using ClickOnce) on a different PC the report presents a dialog box displaying the ServerName and two input fields one for UserID (pre-populated) and one for the Password (empty). When I enter the password it says 'Logon Failed'.
The information is definitely correct because this same information is used to provide user access to the application.
I am relatively sure it is WPF CrystalReportViewer related but unsure how to resolve.
UPDATE: Have since determined that if I install the application on any PC that does not have VS2010 installed it has the error. Also, on the PCs with VS2010 installed Crystal Reports for VS2010 doesn't even have to be installed.
精彩评论