In a Page report or an RDL report, once you connect your report to a data source, in order to get a list of fields to use in the report, you need to add a dataset. Use the following instructions to add a dataset to the report.
These steps assume that you have already added a Page Report/RDL Report template and connected it to a data source. See Adding an ActiveReport to a Project and Connect to a Data Source for further information.
Query and Field settings for XML Data
Connection String
Example of an xmldata connection string.
xmldata=<people>
<person>
<name>
<given>John</given>
<family>Doe</family>
</name>
</person>
<person>
<name>
<given>Jane</given>
<family>Smith</family>
</name>
</person>
</people>;
XMLPath on Query Page
An XMLPath expression returns a value from an XML data source when evaluated with the query. The XML path is represented by slash (/) and the brackets ([]) represent iteration over collection of elements.
For example: /people/person/name
You can also build the XMLPath using XML DataSet Query Builder. Click the Edit with XML Query Designer icon to open XML DataSet Query Builder dialog and then choose the XPath from the tree nodes.
Fields
Once the query is set, build the Fields collection with two fields that contain the following name and value pairs:
Name: given; Value: given
Name: family; Value: family
See Use Fields in Reports to understand fields further.
Query and Field settings for JSON Data
Connection String
Example of a JSON data connection string.
jsondoc=C:\Data\customers.json;schemadata={
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": [
"streetAddress",
"city"
]
},
"phoneNumber": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string"
},
"code": {
"type": "integer"
}
},
"required": [
"location",
"code"
]
}
}
},
"required": [
"address",
"phoneNumber"
]
}
A JSONPath expression returns a value from a JSON data source when evaluated with the query. The JSON path is usually represented by dot (.) notation, with the root object as '$'. The brackets ([]) represent the array of elements.
For example: $.Customers[*]
For more information, please see http://goessner.net/articles/JsonPath/.
You can also build the JSONPath using JSON Query Builder, which can be accessed from Edit with JSON Query Designer icon . The JSON Query Builder displays the structure of the JSON data, obtained from the JSON schema. You can choose the JSONPath from the tree nodes.
Fields
Once the query is set, build the Fields collection with two fields that contain the following name and value pairs:
Name: CompanyName; Value: CompanyName
Name: ContactName; Value: ContactName