cancel
Showing results for 
Search instead for 
Did you mean: 

smart table analytical Table with northwind Odata service

former_member374496
Participant
0 Kudos

Hi Experts,

I am trying to use smart table with the analyticaltable as tabltype with the northwind Odata service, but i am getting a error as follows:

Uncaught (in promise) Failed to instantiate analytical extensions for given OData model: Cannot read property '0' of undefined,

XML CODE:

<core:View controllerName="OdataService.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core"
	displayBlock="true" xmlns="sap.m"  xmlns:smartTable="sap.ui.comp.smarttable">
<App>
<pages>
<Page title="{i18n>title}">
<content>	
<smartTable:SmartTable id="smartTableId" useExportToExcel="true"  
entitySet="Customers" tableType="AnalyticalTable" 			
useVariantManagement="true" useTablePersonalisation="true" 
showTablePersonalisation="true" 
showRowCount="true"
persistencyKey="vehicleDetails.smartTable" 
enableAutoBinding="true" class="sapUiResponsiveContentPadding"
beforeRebindTable="onBeforeRebindTableExtension" 
requestAtLeastFields="CustomerID">
<smartTable:layoutData>
<FlexItemData growFactor="1" baseSize="0%">
</FlexItemData>
</smartTable:layoutData>
<core:ExtensionPoint name="VehicleTableExtension">
</core:ExtensionPoint>
</smartTable:SmartTable>
	
</content>
</Page>
</pages>
</App>
</core:View>



<u>metadata:</u>

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
	<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
		<Schema xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
			xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2008/09/edm"
			Namespace="NorthwindModel">
			<EntityType Name="Customer">
				<Key>
					<PropertyRef Name="CustomerID"/>
				</Key>
				<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" Unicode="true" FixedLength="true"/>
				<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" Unicode="true" FixedLength="false"/>
				<Property Name="ContactName" Type="Edm.String" Nullable="true" MaxLength="30" Unicode="true" FixedLength="false"/>
				<Property Name="ContactTitle" Type="Edm.String" Nullable="true" MaxLength="30" Unicode="true" FixedLength="false"/>
				<Property Name="Address" Type="Edm.String" Nullable="true" MaxLength="60" Unicode="true" FixedLength="false"/>
				<Property Name="City" Type="Edm.String" Nullable="true" MaxLength="15" Unicode="true" FixedLength="false"/>
				<Property Name="Region" Type="Edm.String" Nullable="true" MaxLength="15" Unicode="true" FixedLength="false"/>
				<Property Name="PostalCode" Type="Edm.String" Nullable="true" MaxLength="10" Unicode="true" FixedLength="false"/>
				<Property Name="Country" Type="Edm.String" Nullable="true" MaxLength="15" Unicode="true" FixedLength="false"/>
				<Property Name="Phone" Type="Edm.String" Nullable="true" MaxLength="1" Unicode="false" FixedLength="true"/>
				<Property Name="Fax" Type="Edm.String" Nullable="true" MaxLength="24" Unicode="true" FixedLength="false"/>
				<NavigationProperty Name="Orders" Relationship="NorthwindModel.FK_Orders_Customers" FromRole="Customers" ToRole="Orders"/>
				<NavigationProperty Name="CustomerDemographics" Relationship="NorthwindModel.CustomerCustomerDemo" FromRole="Customers"
					ToRole="CustomerDemographics"/>
			</EntityType>
		</Schema>
		<Schema xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
			xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2008/09/edm"
			Namespace="ODataWeb.Northwind.Model">
			<EntityContainer xmlns:p7="http://schemas.microsoft.com/ado/2009/02/edm/annotation" Name="NorthwindEntities" p7:LazyLoadingEnabled="true"
				m:IsDefaultEntityContainer="true">
				<EntitySet Name="Customers" EntityType="NorthwindModel.Customer"/>
			</EntityContainer>
			<Annotations Target="NorthwindModel.Customer"
				xmlns="http://docs.oasis-open.org/odata/ns/edm">
				<Annotation Term="com.sap.vocabularies.UI.v1.LineItem">
					<Collection>
						<Record Type="com.sap.vocabularies.UI.v1.DataField">
							<PropertyValue Property="Value" Path="CustomerID" />
						</Record>
						<Record Type="com.sap.vocabularies.UI.v1.DataField">
							<PropertyValue Property="Value" Path="CompanyName" />
						</Record>
						<Record Type="com.sap.vocabularies.UI.v1.DataField">
							<PropertyValue Property="Value" Path="ContactName" sap:aggregation-role="dimension" />
						</Record>
						<Record Type="com.sap.vocabularies.UI.v1.DataField">
							<PropertyValue Property="Value" Path="ContactTitle" />
						</Record>
					</Collection>
				</Annotation>
			</Annotations>
		</Schema>
	</edmx:DataServices>
</edmx:Edmx>







Please find the screenshot for the same.

Any suggestion would be great hellp.

Thanks in advance,

Pradeep

Accepted Solutions (0)

Answers (0)