Hello guys,
I am having problems in selecting an XML file from a Common dialog box in RTC.
The same thing works fine in Classic.In RTC, am having the error 'The path specified in invalid'.
Even if i hardcode the path in the code,the error persists.
Anyone has a solution to it?Please please help me out.......
0
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I have seen your previous post on 'Access local files with RTC'.You mentioned about using report Import Profiles - 9172
Can you please help with the code? I am new to RTC. Please help
Report 9172 has code..
Did you check?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Yes, I did and I tried the code.
I used the upload function and used an instream to import the XML file.
But the connection to the server is lost each time i execute the code.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
First, I am fetching the default pathname to set in the dialog
salessetup.GET;
pathname:=COPYSTR(salessetup."Picture Directory",1,STRLEN(salessetup."Picture Directory")-1);
and then the code from Report 1972
IF ISSERVICETIER THEN
BEGIN
TempFile.CREATETEMPFILE;
FileName := TempFile.NAME;
TempFile.CLOSE;
IF UPLOAD('Import from XML File', '','XML Files (*.xml)|*.xml|All Files (*.*)|*.*','',FileName) THEN BEGIN
IFILE.OPEN(FileName);
IFILE.CREATEINSTREAM(istream);
XMLPORT.IMPORT(50002,istream);
IFILE.CLOSE;
MESSAGE('XML HAS BEEN SAVED');
END;
END;
What is your goal?
Importing xmlfile with XMLPORT?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I need to select the XML file from a path. (which is working in Classic but returns the following error in RTC - 'The specified path is invalid'.
The default path will be fetched from Sales & Receivables Setup.
As such ,I have tried to use the code from Report 9172 Import Profiles but it results in losing connection.
Can you help?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But the same thing happened.I lost connection to the server.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Code is not neccessary at present..simply add the xmlport in menusuite and run it frokm RTC..Select Import and click ok..it will ask you to select the path...
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav