• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

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
0
vcharles
Asked:
vcharles
  • 3
1 Solution
 
Nico BontenbalCommented:
I think it is possible to create three separate XML datasets (http://msdn.microsoft.com/en-us/library/ms159741(v=sql.90).aspx)
Then you use the lookup function to link the datasets together (http://msdn.microsoft.com/en-us/library/ee210531.aspx)
0
 
vcharlesAuthor Commented:
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
0
 
vcharlesAuthor Commented:
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.
0
 
vcharlesAuthor Commented:
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
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now