Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: XML Data Source and AutoLink Post Reply Post New Topic
Author Message
rwinters
Newbie
Newbie


Joined: 09 Jan 2009
Online Status: Offline
Posts: 1
Quote rwinters Replybullet Topic: XML Data Source and AutoLink
    Posted: 09 Jan 2009 at 11:52am
I'm using the Report Wizart to import an XML file and I'm getting the message "Unable to smart link unlinked tables". Why is this happening?
 
I am also including the schema file which indicates primary and foreign keys.
 
Much thanks ....
Rwinters
 
<SNIP>
 
 
XML File
 
?xml version="1.0" encoding="UTF-8"?>
<Organization xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" >
      <dept>
            <Deptno>10</Deptno>
            <Dname>Accounting</Dname>
            <Loc>Dallas</Loc>
      </dept>
      <dept>
            <Deptno>20</Deptno>
            <Dname>Production</Dname>
            <Loc>New York</Loc>
      </dept>
      <Employee>
            <Empno>1001</Empno>
            <Ename>Jag</Ename>
            <Sal>2500</Sal>
            <Deptno>10</Deptno>
      </Employee>
      <Employee>
            <Empno>1002</Empno>
            <Ename>Win</Ename>
            <Sal>2600</Sal>
            <Deptno>20</Deptno>
      </Employee>
</Organization>
--Schema File
 

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:complexType name="DeptType">

<xs:sequence>

<xs:element name="Deptno" type="xs:int" />

<xs:element name="Dname" type="xs:string" />

<xs:element name="Loc" type="xs:string" />

</xs:sequence>

</xs:complexType>

<xs:element name="Organization">

<xs:complexType>

<xs:sequence>

<xs:element maxOccurs="unbounded" name="dept" type="DeptType" />

<xs:element maxOccurs="unbounded" name="Employee" type="EmployeeType" />

</xs:sequence>

</xs:complexType>

<xs:key name="PK_Dept_Deptno">

<xs:selector xpath=".//dept" />

<xs:field xpath="Deptno" />

</xs:key>

<xs:key name="PK_Employee_Empno">

<xs:selector xpath=".//Employee" />

<xs:field xpath="Empno" />

</xs:key>

<xs:keyref name="FK_deptEmployee" refer="PK_Dept_Deptno">

<xs:selector xpath=".//Employee" />

<xs:field xpath="Deptno" />

</xs:keyref>

</xs:element>

<xs:complexType name="EmployeeType">

<xs:sequence>

<xs:element name="Empno" type="xs:int" />

<xs:element name="Ename" type="xs:string" />

<xs:element name="Sal" type="xs:float" />

<xs:element name="Deptno" type="xs:int" />

</xs:sequence>

</xs:complexType>

</xs:schema>

 
 
 
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 20 Jan 2009 at 1:14pm

Rule of thumb - Smart Linking is not very smart.  I ALWAYS turn it off in the Options menu when I do a new installation of Crystal.  From my experience with Crystal over the last 12 years or so, you will get better results if you manually link the tables yourself.

Which version of Crystal are you using?  Have you applied any hot fixes or patches?
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.