Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LogOn Failed XML 1

Status
Not open for further replies.

cupcakesrule

Programmer
Feb 6, 2007
35
US
I have a Crystal Report, which is using an XML file for its source, and am trying to get the most recent version by using
Code:
CrystalReportViewer1.RefreshReport();
but when this piece of code is called I get a "LogOn Failed" error. I searched the web and found that people use
ConnectionInfo
but this is part of the CrystalDecisions.Shared namespace and when I try to import this namespace my page errors out, I tried reinstalling Crystal Reports but it did not help. Is there any other work around for this?
 
Have you tried creating a new test project and see if your imports causes a problem? If it does, then there is something wrong the the CR install.
 
that did it I thought I tried that once before but I guess not. I wonder why it has to be in a project for it to work? Thank you
 
I just chose a new file from the menu and saved it as a webform.

I have run into another problem with this, as I stated earlier the datasource for the Report itself is an XML file and I am trying to use the following code to refresh the report before it displays:
Code:
crConnectionInfo.UserID = "******";
crConnectionInfo.Password = "******";
CrystalReportViewer1.RefreshReport();
But I still get a LogOn Failed error. Whenever I refresh the report manually within Crystal the userID and password can be any value and it goes through, but the location always has to be specified is there any ConnectionInfo property that I can use to specify the Location of the XML file, or am I taking the wrong steps to refresh this report?
 
I'm not sure. I have never done a CR with an XML datasource. I'm sure you can find something if you Google and also check BuisnessObjects.com. They have .NET related articles and walkthroughs.
 
Is it possible to set my datasource for my report to a dataview object?
 
Alright I switched everything over to a SQL database and am trying the following code
Code:
crConnectionInfo.ServerName = "****";
crConnectionInfo.DatabaseName = "****";
crConnectionInfo.UserID = "sa";
crConnectionInfo.Password = "****";
CrystalReportViewer1.RefreshReport();
But am still getting a logon failed error, what am I missing??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top