Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with creating a reort with multiple linked xml files

Hello,

I have multiple xml files linked to one xml file by ID. How do I create a report in MS report to display the data in my xml files.

For example.

ItemA.xml

<ItemAtable>
<ItemA_ID>1<ItemA_ID>1
<ItemA> ItemA1</ItemA>
</ItemAtable>
<ItemAtable>
<ItemA_ID>2<ItemA_ID>1
<ItemA> ItemA2</ItemA>
</ItemAtable>


ItemB.xml

<ItemBtable>
<ItemB_ID>1<ItemB_ID>1
<ItemB> ItemB1</ItemB>
</ItemBtable>
<ItemBtable>
<ItemB_ID>2<ItemB_ID>1
<ItemB> ItemB2</ItemB>
</ItemBtable>

link.xml

<LinkTable>
<Link_ID>1<Link_ID>1
<ItemA_ID> 1</ItemA_ID>
<ItemB_ID> 1</ItemB_ID>
<LinkTable>
<LinkTable>
<Link_ID>2<Link_ID>1
<ItemA_ID> 2</ItemA_ID>
<ItemB_ID> 2</ItemB_ID>
<LinkTable>

How do I create my report to link the files and display the following two rows?

ItemA            ItemB

ItemA1            ItemB1
ItemA2            ItemB2

Second part of my questions is, if I have anoher Link file linked to Link.xml. How do I include the data from the other link file based on identical Link_ID? For example

Link2.xml

<LinkTable>
<Link_ID>1<Link_ID>1
<ItemC_ID> 1</ItemA_ID>
<ItemD_ID> 1</ItemB_ID>
<LinkTable>
<LinkTable>
<Link_ID>2<Link_ID>1
<ItemC_ID> 2</ItemA_ID>
<ItemD_ID> 2</ItemB_ID>
<LinkTable>


ItemA            ItemB           ItemC           ItemD

ItemA1            ItemB1        ItemC1         ItemD1
ItemA2            ItemB2        ItemC2          ItemD2

This  is a Windows applicationn with VS2010, MSReport is .rdlc file.

Thanks,

Victor
ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Victor  Charles

ASKER

Hi,

Sorry for the late reply.

I placed the report control on my form, click on the right had corned to create a datasource and the rdlc file automatically appeared on my project, problem is I don't see a connection option for xml datasource. How do I include xml files in my dataset?

Victor
Hi,

How do you create a dataset with multiple xml files? Created in .xsd file but unable to include xml files using the dataadapter, I don't see an option to load xml files.

V.
Hi,

I combined all the link files in one xml file (LinkAll.xml), problem is with my For Next statements, can you please help me figure it out. My report is returning 8 records instead of two record for LinkAID =1 and LinkAID = 2.  Below is the link to the project.

http://speedy.sh/akWdR/WindowsApplication6-Final.zip

Victor