Calling a Dynamics NAV OData web service
As you already know, you can publish page and query objects and OData web services in Dynamics NAV. Reporting Services reports can also use OData web services as data sources.
Note
In Chapter 9, Power BI, there are examples of how you can publish a query or page as a web service.
I will create the same report again, a list of customers, but this time based on an OData web service. I will first create a new Page 90000 Customers, in which I will add the field from the Customer
table that I want to use in my report. Then, I will publish this page as a web service:
Then, I will create a new report in SSDT. I will use a new data source in this report. I'm not going to fetch the data directly from SQL Server, but from the OData web service. In order to do that, the data source needs to be of the type XML:
The connection string is the URL of the OData web service from Dynamics NAV. I will then create a dataset named Customers
, as follows:
In summary, as a Query...