jQWidgets Forums
jQuery UI Widgets › Forums › TreeGrid › subaggregate value is "undefined" when groupingDataFields > 1
This topic contains 2 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 6 months ago.
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
Hi,
We are trying to use the treeGrid to display a financial summary with multiple levels of subtotals. The subaggregate works properly for the inner grouping and the grand total but the outer grouping displays “undefined”
<!doctype html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="js/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="js/jquery/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxdatatable.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxtreegrid.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxcheckbox.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript"> $(document).ready(function () { // prepare the data var source = { dataType: "csv", dataFields: [ { name: 'Claim', type: 'string' }, { name: 'ReserveID', type: 'number' }, { name: 'Claimant', type: 'string' }, { name: 'Category', type: 'string' }, { name: 'Coverage', type: 'string' }, { name: 'Status', type: 'string' }, { name: 'Paid', type: 'float' }, { name: 'Outstanding', type: 'float' }, { name: 'Incurred', type: 'float' }, { name: 'Recovery', type: 'float' }, { name: 'NetIncurred', type: 'float' } ], hierarchy: { groupingDataFields: [ { name: "Claim" }, { name: "Claimant" } ] }, id: 'ReserveID', url: 'reserveData.csv' }; var dataAdapter = new $.jqx.dataAdapter(source); var theme = 'custom' $("#treeGrid").jqxTreeGrid( { width: 1100, height: 600, source: dataAdapter, theme: theme, pageable: true, pagerMode: 'advanced', pageSize: 20, columnsResize: true, sortable: true, filterable: true, filterMode: 'advanced', showAggregates: true, showSubAggregates: true, aggregatesHeight: 25, columns: [ { text: 'Category', dataField: 'Category', align: 'center', minWidth: 100 }, { text: 'Coverage', dataField: 'Coverage', align: 'center', minWidth: 100 }, { text: 'Status', dataField: 'Status', align: 'center', minWidth: 100 }, { text: 'Paid', dataField: 'Paid', cellsFormat: "f2", align: 'center', cellsAlign: 'right', minWidth: 100, width: 100, aggregates: ['sum'] }, { text: 'Outstanding', dataField: 'Outstanding', cellsFormat: "f2", align: 'center', cellsAlign: 'right', minWidth: 100, width: 100, aggregates: ['sum'] }, { text: 'Incurred', dataField: 'Incurred', cellsFormat: "f2", align: 'center', cellsAlign: 'right', minWidth: 100, width: 100, aggregates: ['sum'] }, { text: 'Recovery', dataField: 'Recovery', cellsFormat: "f2", align: 'center', cellsAlign: 'right', minWidth: 100, width: 100, aggregates: ['sum']}, { text: 'Net Incurred', dataField: 'NetIncurred', cellsFormat: "f2", align: 'center', cellsAlign: 'right', minWidth: 100, width: 100, aggregates: ['sum'] } ] }); }); </script> </head> <body> <div id="treeGrid"> </div> </body>
Data (reserveData.csv):
2014-010103,10,Claimant A,Loss,General Liability-BI,Open, 3008.09,18115.03,21123.12, 3221.00,17902.12 2014-010103,20,Claimant A,Loss,General Liability-PD,Open, 2321.22,2678.78,5000.00, 3221.00,1779.00 2014-010103,30,Claimant A,Legal Expense,,Open, 0,15000,15000.00, 0,15000 2014-010103,40,Claimant A,Expense,,Open, 123.12,0,123.12, 0,123.12 2014-010103,45,Claimant B,Expense,,Open, 250,0,250, 0,250 2014-010116,50,Claimant C,Loss, Workers Compensation, Open, 5000, 5000, 5000, 0, 5000
Hi pauld,
We confirm the reported behavior and will do our best to resolve it as soon as possible.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.