Export To Excel with Aggregate

6 posts, 1 answers
  1. Waldo
    Waldo avatar
    3 posts
    Member since:
    Dec 2012

    Posted 02 Sep 2015 Link to this post

    Hi, 

    When I'm using the export to excel function it works fine. But once I add an aggregate to the datasource as in one of the demos, I get the error attached.

    Is one of my configurations wrong?

    Your help will be much appreciated.

    Thanks,

    Waldo

    My Code is as follows: 

     

    @helper TreeGrid()
    {
        <div>
        @(Html.Kendo().TreeList<OrgStructureViewModel>()
            .Name("treelist")
            .Columns(columns =>
            {
                columns.Add().Field(e => e.Full_Name)
                   .FooterTemplate("<strong>#= count # employee(s)</strong>");
                columns.Add().Field(e => e.Emp_No);
                columns.Add().Field(e => e.Man_No).Hidden(true);
                columns.Add().Field(e => e.Division_ID).Template("#= Division #");
                columns.Add().Field(e => e.Title);
                columns.Add().Command(c => { c.Edit(); c.Destroy(); }).Width(220);
            })
            .Toolbar(x => { x.Create();  x.Excel(); x.Pdf(); })
            .Editable(x => x.Mode("popup"))
            .Filterable()
            .ColumnMenu(true)
            .Scrollable(true)
            .Sortable()
            .Resizable(true)
            .Excel(excel => excel
                .FileName("Reporting_Line.xlsx")
                .ProxyURL(Url.Action("Export_Save", "Reporting_Line"))
            )
            .Pdf(pdf => pdf
                .FileName("Reporting_Line.pdf")
                .ProxyURL(Url.Action("Export_Save", "Reporting_Line"))
            )
            .Events(ev => ev.Edit("onEdit"))
            .DataSource(dataSource => dataSource
                .Read(read => read.Action("Reporting_LineRead", "OrgStructure"))
                .Update(update => update.Action("Reporting_LineEdit", "OrgStructure"))
                .Create(create => create.Action("Reporting_LineAdd", "OrgStructure"))
                .Destroy(delete => delete.Action("Reporting_LineDelete", "OrgStructure"))
                 .ServerOperation(false)
                 .Aggregates(aggr =>
                 {
                     aggr.Add(e => e.Full_Name).Count();
                 })
                .Model(m =>
                {
                    m.Id(f => f.Reporting_Line_ID);
                    m.ParentId(f => f.ReportsTo);
                    m.Field(f => f.Emp_No);
                    m.Field(f => f.Man_No);
                    m.Field(f => f.Division_ID);
                    m.Expanded(false);
     
                })
            )
        )
    }

     

     

    <script type="text/javascript">   
        function onEdit(e) {
            console.log(e);
            if (!e.model.isNew()) {
                $("#Emp_No").data("kendoComboBox").enable(false);
            } else {
                $("#Division_ID").data("kendoDropDownList").enable(false);           
            }
        }
     
        function filterEmployees() {
            console.log($("#Emp_No").data("kendoComboBox").value());
            return {
                empNo: $("#Emp_No").data("kendoComboBox").value(),
                text: $("#Man_No").data("kendoComboBox").text()
            };
        }
    </script>

     

  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2156 posts

    Posted 03 Sep 2015 Link to this post

    Hello Waldo,

    Thank you for reporting the problem, we were not aware of it. I have escalated it to the developers team and it is logged for fixing. As a small sign of gratitude I update your Telerik points.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Waldo
    Waldo avatar
    3 posts
    Member since:
    Dec 2012

    Posted 18 Sep 2015 Link to this post

    Hi Dimiter,

    Thanks for the points :)

    Do you have eta on when it will be fixed? 

    Thanks,

    Waldo

     

     

  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 21 Sep 2015 Link to this post

    Hello Waldo,

    I am afraid that we do not have a time frame for the implementation of this functionality at this time.

    Regards,
    Alex Gyoshev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Waldo
    Waldo avatar
    3 posts
    Member since:
    Dec 2012

    Posted 07 Apr Link to this post

    Hi Guys,

    Has any progress been made on this? 

    Thanks,

    Waldo

     

  7. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 08 Apr Link to this post

    Hello Waldo,

    I am afraid not. We have evaluated the required effort and the feature is non-trivial to implement, and is not scheduled for implementation yet. You can submit this as a feature request on UserVoice, so that it can gather votes from other users of the framework.

    Regards,
    Alex Gyoshev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready