c# - Crystal Report Viewer Not Accepting Login Info -


I am trying to create a simple crystal report viewer application and I can not set the login information to the viewer. Basically I want to open a report when I click on a button. Very simple I thought but apparently not. Here is my code

  Private Zero Button 1_Click (Object Sender, EventArgs e) {ConnectionInfo connInfo = new ConnectionInfo (); ConnInfo.ServerName = "server name"; ConnInfo.DatabaseName = "Database"; ConnInfo.userID = "USERNAME"; ConnInfo.Password = "password"; CrystalReportViewer1.ReportSource = GetReportSource (connInfo); CrystalReportViewer1.RefreshReport (); } Private Report Dockground GetReportSource (ConneInInfo connInfo) {Report Document Document = New Report Document (); Document.Load ("REPORTPATH"); Document.SetParameterValue (0, "04/02/2014"); Document.SetParameterValue (1, "04/03/2014"); TableLogOnInfos logoninfo = New TableLogOnInfos (); TableLogOnInfo logonInfo = New TableLogOnInfo (); Tables table; Tables = documents; database tables; Forwarding (crystallized crystalline. Table in engine table) {logonInfo = table.LogOnInfo; LogonInfo.ConnectionInfo = connInfo; Table.ApplyLogOnInfo (logonInfo); } Return Document; }   

The worst part is that this code works fine on one of my computers, but I do not want to work on it. Again, this code works entirely on my computer and works, but the other is not and I do not understand for my life. God I hope someone can help.

When I run the program and click on the button, it prompts me for a username and password, but when I enter it, it says that "login failed" is another The problem is that the "database" field should not be loaded on the login form.

Ok I solved it completely Not sure why this work was done, but I What did you do for posting here, because I was not able to help anyone here.

Earlier I installed crystal reports on the computer which was giving me a problem. (My company has a license for 2011, so I had established on 2011)

Next, I opened the report (using the Crystal Reports 2011 program) and tried to preview it, login it to me Inspired for information so that I generate login information and report a preview.

Finally I ran the program and it worked!

So I think most of the problem was solved by installing crystal reports, but I think it is still necessary to go into the report and make sure that it can generate a preview.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -