Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to link tables from xml data source?

When trying to build a report from xml data source (.xml and .xsd files), we can't link together fields from various tables. Look the example in the following zip file:

Link: [http://www.tol.com.gr/various/xml_reporting.zip]

How it can be done like the including report which has a mdb as its data source?

You can see what we need to do in the following image:

Link: [http://www.tol.com.gr/various/table_linking_mdb.png]

This was done using mdb as data source. But with xml as data source we can not link any fields together.

Could it be a problem with our xml schema?

We are using Crystal Reports XI Release 2 SP3.

replied

Hi Takis,

XML driver supports hierarchical data, which prevents it from doing linking

There is a work around which can give the records which are the result of two tables with the same key

However, you can create two XML data sources in your report and link those together. Here are the basic steps to follow:

1: Create connection based on XML driver with the XSD/XML files.

2: For Ex: Select two tables: Northwind/Customers and Northwind/Orders.

3: Click next, then show the u201Ctable link pageu201D, click next also, and click u201COKu201D when there is a pop-up dialog.

4: Select some fields in both two tables. (e.g. CustomerID and CompanyName in Northwind/Customers, OrderID, CustomerID and OrderDate in Northwind/Orders).

5: Click Finish, you can see the all Cross-Join result.

6: Click u201CReportu201D menu, and select u201CFormula WorkShopu2026u201D, select u201CSelection Formulasu201D, in the u201CRecord Selectionu201D section, input the {Northwind/Orders.CustomerID} = {Northwind/Customers.CustomerID}

7: Click u201CSave and Closeu201D, then we can see the records are the result which joined two tables with the key u201CCustomerIDu201D

I hope this information helps you.

Regards,

Prashant

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question