cancel
Showing results for 
Search instead for 
Did you mean: 

Error: logon failed. details mscorlib could not find file

Former Member
0 Kudos

I used to use crystal reports in old version in visual studio 2005, my strategy in developing is used the XML files as a database,

so I am using database export to load my XML file to the report, and after that

I use Set database location to change my file directory from my computer path like "C:\Documents and Settings\amohamady\Local Settings\Temp\myTable.Xml" to be "myTable.Xml" only to avoid  my specific file location.

this last step for making my report run under any windows Temp directory.

this method working correctly in 2005 version ,

But in 2010 version  I got an exception when I just change the file location  that :

" logon failed. details mscorlib could not find file 'C:\Documents and Settings\amohamady\My Documents\Visual Studio 2010\Projects\myProject\myProject\Reports' "

why crystal report make this behavior ?? I think report must looking for the XML file in the Temp Directory not in the project reports folder,

please any one help me in this problem.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Ahmed,

Which XML driver were you using, ADO.NET ( XML ) or the legacy Crystal XML driver ( crdb_xml.dll )

We no longer ship the legacy Driver with CR for VS 2010, it's been deprecated because there are Java Dependencies on it and we don't ship or install Java runtime with this version of the product.

If you can convert your reports to use the ADO.NET driver. Try exporting the report to XML and then compare XML files, it may be that your legacy XML format needs to be updated.

Don

Former Member
0 Kudos

this XML file is an ADO.Net format I created like that :

----------------------------------------------------------------------------------------------------

//C# Code

DataTable myTable;

dataAdapter.fill(myTable);

myTable.WriteXml(Path.GetTempPath() + "\\myTable.Xml", XmlWriteMode.WriteSchema);
---------------------------------------------------------------------------------------------------

0 Kudos

Hi Ahmed,

Good, using the supported driver.

So at this point Crystal is not even being called. Your error is writing the XML file to the users temp folder. This is not a Crystal Reports issue. Post your question to Microsofts Forums.

Once you do write the file then I you use

rpt.SetDataSource(ds);

At this poin then CR is being called.

Thanks

Don

Former Member
0 Kudos

thank you Mr.Williams it's working

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Use Process Monitorto see where the file is being looked for and if it is accessible to the process.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

no sir I think this file is not looked because I create it and this way working correctly