Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In visual studio 2002 I don't have to give my cristal report the full path of the xml file - otherwise i put myFile.xml in the same path with crl.rpt so my application can work on any other machine but in visual studio 2008 when I do that, the crystal report doesn't see the xml file until I give it the full path of the xml file.

Can any one help me with this problem - it makes me crazy...
Posted
Updated 14-Jun-10 1:45am
v2

I guess they did this to stop people writing bad code. Relying on a relative path is always bad. Use the full path.
 
Share this answer
 
if i put the full path i will not work on other machines
how i can do set database location with out the full path of the xml file while the cristal report and the xml file in the same folder in the Debug
 
Share this answer
 
i had solved it, i put myXmlFile.xml in the temp path of the system like that

ds.WriteXml(System.IO.Path.GetTempPath() + @"\\" file.xml "", XmlWriteMode.WriteSchema);

so in SET DATASOURCE LOCATION of the report i just write file.xml not the full path of it so it can work at any machine.

the couse of that is in visual stodio 2008 create thtemp of any report in the system temp directory.

thanks alot :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900