Purpose: in RTC, run xmlport, export file to the one specified in code
issues:
1) it works but it seems to only work in direct call of the xmlport i.e.
OutFile.CREATE('c:\temp\exportfile.xml');
OutFile.CREATEOUTSTREAM(OutStream);
XMLPORT.EXPORT(50000, OutStream);
OutFile.CLOSE;
When run it in RTC, it creates the file c:\temp\exportfile.xml ok, however, it doesn't show the Required Filter Fields dialog box before run?! Am I doing something wrong?
Whereas
2) if I define the xmlport varible and call it like:
OutFile.CREATE('c:\temp\exportfile.xml');
OutFile.CREATEOUTSTREAM(OutStream);
XMLExportObj.SETDESTINATION(OutStream);
XMLExportObj.RUN;
OutFile.CLOSE;
In RTC, The Required Filter Fields Dialog box shows up, but then it doesn't recognize the specified file path. It totally ignores the Outfile lines of code (I could even comment those lines out, just call the XMLExportObj.RUN and it would still run correctly), but has to bring up the SAVE AS window common dialog (defaulting to c:\Documents & Settings\Networkservice\Local Settings\Temp folder).
Seems like I can't have both (filter dialog box and save export to the specified path without window common dialog) or is there something wrong with the RTC setup?
I'd spent many hours on the web and blogs, but not going anywhere. Would someone give me a pointer of what is going on? :-k many thanks in advance.
0
Comments
If it is report, you can give filter options in request form and pass them as a variable to xmlport.export
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I do, however, appreciate your time in giving me pointers and ideas. I welcome and will keep exploring workarounds, if there's any ... ](*,)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!