Exporting report to XML issue.

Tiwaz
Member Posts: 98
Hello Experts.
I am trying to export existing report to XML so I can perform some further formating on that XML.
I used this synthax:
REPORT.SAVEASXML(38023564,'C:\Proba.xml');
but it returns error (in attachment)... I tried many different locations + I have full control over named file under Permissions for SYSTEM.
What can be cause of this and is there an alternative way to save report to XML?
THANKS IN ADVANCE
I am trying to export existing report to XML so I can perform some further formating on that XML.
I used this synthax:
REPORT.SAVEASXML(38023564,'C:\Proba.xml');
but it returns error (in attachment)... I tried many different locations + I have full control over named file under Permissions for SYSTEM.
What can be cause of this and is there an alternative way to save report to XML?
THANKS IN ADVANCE
0
Answers
-
You won't be able to save on the root of drive C:
Also remember that it will be saving on the server running the NST and it is the account running the NST service that needs access to the path (from the server). I.e. C:\Temp with be the one on the server not the one on your machine.1 -
It will be saved on the computer that is running Microsoft Dynamics NAV Server.
Please check whether you have permissions in that server.1 -
Thank you for your answer. Not sure I comprehend.
I tried to set a path to Flash drive but it reports "Device not ready".
Could you explain in a bit mored detail what should I do to succesfully save this file?0 -
you need to have permission to the path in NST Server and Use Download function to copy the file from NST server to local machine..0
-
Hello. Our System Administrator just checked and I have all permissions set.
I also tried a code from article above but now error reads that I have no permissions or that path is Read-only which is not the case!0 -
Ok, I managed to make it work. Code from https://msdn.microsoft.com/en-us/library/dn789624(v=nav.90).aspx worked when I only placed file name in Name := without path
Now, just a quick question:
Is it possible to transform XML we get from report using XSD file? Because it gives me error
Incorrect definition for the root element in schema.
When I use this xsd
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://pid.purs.gov.rs" version="1.4.3"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://pid.purs.gov.rs">
<xs:element name="PodaciPoreskeDeklaracije" type="tns:PodaciPoreskeDeklaracijeTip"/>
<xs:simpleType name="DecimalPozitivNulaTip">
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:fractionDigits value="2"/>
<xs:maxInclusive value="9999999999999999.99"/>
</xs:restriction>
</xs:simpleType>
.
.
.
.
</xs:schema>
on this xml I got from report:
<?xml version="1.0" standalone="yes"?>
<ReportDataSet name="IOSI" id="38023564">
<DataItems>
<DataItem name="Company_Information">
<Columns>
<Column name="Year">2016</Column>
<Column name="Month">Novembar</Column>
<Column name="CompanyName">IN2 Dynamics</Column>
<Column name="City">Beograd</Column>
<Column name="Adresa">Vladimira Popovića 6</Column>
<Column name="PIB">200010503</Column>
<Column name="CompanyID">26304040</Column>
<Column name="InustryCode"></Column>
<Column name="TotalEmplWithDisabilities">0</Column>
.
.
.
.
.
.
<Column name="gcDiffAmt7"></Column>
<Column name="gcDiffAmt8"></Column>
<Column name="gcDiffAmt9"></Column>
<Column name="gcDiffAmt10"></Column>
</Columns>
</DataItem>
</DataItems>
</ReportDataSet>0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions