PivotGrid: Unknown server tag ej:Field

Hi,

I try to test the PivotGrid but i'm getting Unknown server tag ej:Field.


Here is my code:

<%@ Register Assembly="Syncfusion.EJ.Olap, Version=14.1460.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>
<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>
<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <ej:PivotGrid ID="PivotGrid1" runat="server" ClientIDMode="Static">
        <DataSource>
            <Rows>
                <ej:Field FieldName="Country" FieldCaption="Country"></ej:Field>
            </Rows>
            <Columns>
                <ej:Field FieldName="Product" FieldCaption="Product"></ej:Field>
            </Columns>
            <Values>
                <ej:Field FieldName="Amount" FieldCaption="Amount"></ej:Field>
            </Values>
            <Filters>
                <ej:Field FieldName="Date" FieldCaption="Date"></ej:Field>
            </Filters>
        </DataSource>
    </ej:PivotGrid>

</asp:Content>


What am i doing wrong?

Thanks,   
   Tomer

3 Replies

TO tomer October 19, 2017 09:44 AM UTC

I also get the warning

Element 'Field' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.



TO tomer October 19, 2017 09:51 AM UTC

I also get the error

Could not load file or assembly 'Syncfusion.EJ.Pivot' or one of its dependencies. The system cannot find the file specified.

when I use the part of code from your example:


<%@ Register Assembly="Syncfusion.EJ.Olap, Version=14.1460.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>

<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>

<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %>


<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">


    <ej:PivotGrid ID="PivotGrid1" runat=server url="/PivotGridService">

        <ClientSideEvents  AfterServiceInvoke="OnAfterServiceInvoke"/>

    </ej:PivotGrid>


    <ej:PivotSchemaDesigner ID="PivotSchemaDesigner" runat=server></ej:PivotSchemaDesigner>

 

    <script type="text/javascript">

     OnAfterServiceInvoke = function (evt) {

     if (evt.action == "initialize") {

      var PivotSchemaDesigner = $( ".e-pivotschemadesigner").data('ejPivotSchemaDesigner');

         if (PivotSchemaDesigner.model.pivotControl == null) {

             PivotSchemaDesigner.model.pivotControl = this;

             PivotSchemaDesigner.model.enableWrapper = true;

             PivotSchemaDesigner.model.layout = "excel";

             PivotSchemaDesigner._load();

          }

        }

      }

    </script>


</asp:Content>



Thanks,

   Tomer



MM Manikandan Murugesan Syncfusion Team October 20, 2017 12:04 PM UTC

Hi Tomer, 

Thanks for Contacting Syncfusion Support. 

Please find the response below. 

S.No 
Query 
Comments 
1. 
I try to test the PivotGrid but i'm getting Unknown server tag ej:Field. 
 
Here is my code: 
 
<%@ Register Assembly="Syncfusion.EJ.Olap, Version=14.1460.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %> 
<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %> 
<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %> 
 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
 
    <ej:PivotGrid ID="PivotGrid1" runat="server" ClientIDMode="Static"> 
        <DataSource> 
            <Rows> 
                <ej:Field FieldName="Country" FieldCaption="Country"></ej:Field> 
            </Rows> 
            <Columns> 
                <ej:Field FieldName="Product" FieldCaption="Product"></ej:Field> 
            </Columns> 
            <Values> 
                <ej:Field FieldName="Amount" FieldCaption="Amount"></ej:Field> 
            </Values> 
            <Filters> 
                <ej:Field FieldName="Date" FieldCaption="Date"></ej:Field> 
            </Filters> 
        </DataSource> 
    </ej:PivotGrid> 
 
</asp:Content> 
 
 
What am i doing wrong? 
 
Element 'Field' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. 
We have analyzed your code snippet and suspect that, “Syncfusion.EJ.dll” is not referred properly. So, kindly refer appropriate version in both your sample and “web.config” file. 
2. 
I also get the error 
Could not load file or assembly 'Syncfusion.EJ.Pivot' or one of its dependencies. The system cannot find the file specified. 
when I use the part of code from your example: 
 
<%@ Register Assembly="Syncfusion.EJ.Olap, Version=14.1460.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %> 
<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %> 
<%@ Register Assembly="Syncfusion.EJ.Pivot" Namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %> 
 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
 
    <ej:PivotGrid ID="PivotGrid1" runat=server url="/PivotGridService"> 
        <ClientSideEvents  AfterServiceInvoke="OnAfterServiceInvoke"/> 
    </ej:PivotGrid> 
 
    <ej:PivotSchemaDesigner ID="PivotSchemaDesigner" runat=server></ej:PivotSchemaDesigner> 
  
    <script type="text/javascript"> 
     OnAfterServiceInvoke = function (evt) { 
     if (evt.action == "initialize") { 
      var PivotSchemaDesigner = $( ".e-pivotschemadesigner").data('ejPivotSchemaDesigner'); 
         if (PivotSchemaDesigner.model.pivotControl == null) { 
             PivotSchemaDesigner.model.pivotControl = this; 
             PivotSchemaDesigner.model.enableWrapper = true; 
             PivotSchemaDesigner.model.layout = "excel"; 
             PivotSchemaDesigner._load(); 
          } 
        } 
      } 
    </script> 
 
</asp:Content> 
We have renamed “Syncfusion.EJ.Olap.dll” to “Syncfusion.EJ.Pivot.dll” from the version 14.3.0.49. Currently, our online document contains information based on the updated version. So, kindly upgrade the product version or please use “Syncfusion.EJ.Olap.dll” instead of “Syncfusion.EJ.Pivot.dll”. 

Meanwhile, we have prepared sample for your reference. Please find the sample in below link. 

Please let us know if you have any queries. 

Thanks, 
Manikandan.

Loader.
Up arrow icon