Posted 4 August 2017, 3:12 pm ESTHi,
I am struggling to get a sub report to work properly and finding the sample and the docs not quite getting me there.
I have attatched a simple data structure and each main node has a collection of sub nodes that i want to display on a sub report contained on the main report page.
I either get no nodes or i get all the nodes at that level in the xml tree.
It must be somethign im getting wrong with the path or the Nodelist on the data source.
Could you help point out what im doing wrong please?
On my top level report i am putting //LOCALDATA as the XPath.
For the data items on customer i am putting CUSTOMER/NAME etc
What i want then is to pass the ITEMS collection to a sub report datasource as a colelction of nodes.
On the sub report i want to filter on ItemType too.
This is the code for getting the sollection of nodes:
Dim xDS As New DataDynamics.ActiveReports.DataSources.XMLDataSource
xDS.NodeList = CType(CType(Me.DataSource, DataDynamics.ActiveReports.DataSources.XMLDataSource).Field("ITEMS/ITEM", True), System.Xml.XmlNodeList)
subRep.Report = New arLocalInfo
subRep.Report.DataSource = xDS
CType(subRep.Report, arLocalInfo).ItemType = ItemType.Type1
The Xpath for the sub report wants to look something like this i believe:
Tried alsorts of combinations but to no avail.
Any help appreciated.