on 07-11-2012 4:14 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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);
---------------------------------------------------------------------------------------------------
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.