Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid ExportClientData Excel different from CSV and XML

    SmartClient Ajax RIA system
    Version v12.0p_2018-04-03/PowerEdition Deployment (2018-04-03)

    have problem when exporting to Excel the values is displaying RawValues and not the FormattedField have checked the server and both exports CSV and EXCEL on the server side they both show the same Exported Data
    Code:
    07-19 16:15:06 [INFO] Performing 1 operation(s)
    07-19 16:15:06 [INFO] Export data passed to server:
    [
        {
            orderNumber:"ALS1539",
            paperCode:"50HP",
            width:"112.00",
            supplierOrderNumber:"ALS1539-1",
            numberRollsOrdered:"5",
            numberRollsOrdered$style:{
                rawValue:5,
                format:",0"
            },
            tonsPerRoll:"22",
            tonsPerRoll$style:{
                rawValue:21.84
            },
            rollsReceived:"0",
            rollsReceived$style:{
                rawValue:0,
                format:",0"
            },
            weightReceived:"0.000",
            weightReceived$style:{
                rawValue:0
            },
            rollsRemaining:"5",
            rollsRemaining$style:{
                rawValue:5,
                format:",0"
            },
            weightRemaining:"21.840",
            weightRemaining$style:{
                rawValue:43680
            }
        },
        {
            orderNumber:"ALS1538",
            paperCode:"42PCA",
            width:"112.00",
            supplierOrderNumber:"ALS1538-2",
            numberRollsOrdered:"15",
            numberRollsOrdered$style:{
                rawValue:15,
                format:",0"
            },
            tonsPerRoll:"66",
            tonsPerRoll$style:{
                rawValue:65.52
            },
            rollsReceived:"0",
            rollsReceived$style:{
                rawValue:0,
                format:",0"
            },
            weightReceived:"0.000",
            weightReceived$style:{
                rawValue:0
            },
            rollsRemaining:"15",
            rollsRemaining$style:{
                rawValue:15,
                format:",0"
            },
            weightRemaining:"65.520",
            weightRemaining$style:{
                rawValue:131039.99999999999
            }
        },
        {
            orderNumber:"ALS1538",
            paperCode:"42PCA",
            width:"98.00",
            supplierOrderNumber:"ALS1538-1",
            numberRollsOrdered:"6",
            numberRollsOrdered$style:{
                rawValue:6,
                format:",0"
            },
            tonsPerRoll:"23",
            tonsPerRoll$style:{
                rawValue:22.932
            },
            rollsReceived:"0",
            rollsReceived$style:{
                rawValue:0,
                format:",0"
            },
            weightReceived:"0.000",
            weightReceived$style:{
                rawValue:0
            },
            rollsRemaining:"6",
            rollsRemaining$style:{
                rawValue:6,
                format:",0"
            },
            weightRemaining:"22.932",
            weightRemaining$style:{
                rawValue:45864
            }
        }
    ]
    CSV and XML shows the correct formatted values
    but when exporting in XLS is showing the RawValues and not the formatted value
    here is what i am doing
    i have SimpleType Field that generates dynamic types based on the database unit and display unit that are stored in the db
    Code:
                                    isc.SimpleType.create({
                                            name: field.type,
                                            inheritsFrom: "float",
                                            normalDisplayFormatter: function (value) {
                                                return avista.formattedFieldConvert(value, dbTable, dbField, dbMeasure);
                                            },
                                            shortDisplayFormatter: function (value) {
                                                return this.normalDisplayFormatter(value);
                                            },
                                            getGroupTitle: function (value, record, field, fieldName, component){
                                                return this.normalDisplayFormatter(value);
                                            },
                                            editorType: "UOMItem"
                                        });
    this is how i am calling the exports
    Code:
    FOR CSV :
                                            grid.exportClientData({ exportAs: 'csv',exportDisplay: 'download'});                      
    
    FOR EXCEL:
                                            grid.exportClientData({ exportAs: 'xls',exportDisplay: 'download'});
    here is some of the out put results
    CSV:
    Code:
    "OrderNumber","Paper Code","Width","Supplier OrderNumber","NumRolls","Tons Ordered","Rolls Received","Weight Received","Rolls Remaining","weightRemaining"
    "ALS1539","50HP","112.00","ALS1539-1","5","22","0","0.000","5","21.840"
    "ALS1538","42PCA","112.00","ALS1538-2","15","66","0","0.000","15","65.520"
    "ALS1538","42PCA","98.00","ALS1538-1","6","23","0","0.000","6","22.932"
    "ALS1538","42PCA","98.00","ALS1538-2","5","19","0","0.000","5","19.110"
    "ALS1537","33MP","93.00","ALS1537-1","6","22","0","0.000","6","21.762"
    "ALS1536","31NSL","93.00","ALS1536-1","6","22","0","0.000","6","21.762"
    "ALS1535","52HP","120.00","ALS1535-1","5","23","0","0.000","5","23.400"
    "ALS1535","52HP","132.00","ALS1535-1","15","77","0","0.000","15","77.220"
    "ALS1534","31HP","93.00","ALS1534-1","10","36","0","0.000","10","36.270"
    "ALS1534","31HP","98.00","ALS1534-1","10","38","0","0.000","10","38.220"
    "ALS1533","40M","111.14","ALS1533-1","5","22","0","0.000","5","21.816"
    "ALS1533","69K","112.00","ALS1533-2","10","44","0","0.000","10","43.680"
    "ALS1533","69K","120.00","ALS1533-2","10","47","0","0.000","10","46.800"
    "ALS1533","69K","98.00","ALS1533-2","6","23","0","0.000","6","22.932"
    "ALS1532","33XP70","98.00","ALS1532-1","6","23","0","0.000","6","22.932"
    "ALS1532","33XP70","98.00","ALS1532-2","6","23","0","0.000","6","22.932"
    "ALS1532","42XP90","120.00","ALS1532-3","20","94","0","0.000","20","93.600"
    "ALS1530","31HP","126.00","ALS1530-3","5","25","0","0.000","5","24.570"
    "ALS1530","31HP","132.00","ALS1530-3","35","180","0","0.000","35","180.180"
    "ALS1530","31HP","93.00","ALS1530-1","6","22","0","0.000","6","21.762"
    "ALS1530","31HP","98.00","ALS1530-2","6","23","0","0.000","6","22.932"
    "ALS1529","23M","131.14","ALS1529-1","40","206","0","0.000","40","205.725"
    "ALS1529","33M","97.14","ALS1529-2","6","23","0","0.000","6","22.903"
    "ALS1528","23M","131.14","ALS1528-2","20","103","0","0.000","20","102.863"
    "ALS1528","23M","131.14","ALS1528-3","20","103","0","0.000","20","102.863"
    "ALS1528","23M","92.14","ALS1528-1","6","22","0","0.000","6","21.733"
    "ALS1528","23M","97.14","ALS1528-3","6","23","0","0.000","6","22.903"
    "ALS1527","42WT","112.00","ALS1527-2","3","13","0","0.000","3","13.104"
    "ALS1527","42WT","112.00","ALS1527-3","6","26","0","0.000","6","26.208"
    "ALS1527","42WT","112.00","ALS1527-5","3","13","0","0.000","3","13.104"
    "ALS1527","42WT","112.00","ALS1527-6","4","17","0","0.000","4","17.472"
    "ALS1527","42WT","112.00","ALS1527-8","2","9","0","0.000","2","8.736"
    "ALS1527","42WT","112.00","ALS1527-9","5","22","0","0.000","5","21.840"
    "ALS1527","42WT","120.00","ALS1527-10","2","9","0","0.000","2","9.360"
    "ALS1527","42WT","120.00","ALS1527-2","7","33","0","0.000","7","32.760"
    "ALS1527","42WT","120.00","ALS1527-3","6","28","0","0.000","6","28.080"
    "ALS1527","42WT","120.00","ALS1527-5","7","33","0","0.000","7","32.760"
    "ALS1527","42WT","120.00","ALS1527-6","6","28","0","0.000","6","28.080"
    "ALS1527","42WT","120.00","ALS1527-7","4","19","0","0.000","4","18.720"
    "ALS1527","42WT","120.00","ALS1527-8","5","23","0","0.000","5","23.400"
    "ALS1527","42WT","120.00","ALS1527-9","5","23","0","0.000","5","23.400"
    "ALS1527","42WT","126.00","ALS1527-1","3","15","0","0.000","3","14.742"
    "ALS1527","42WT","126.00","ALS1527-2","2","10","0","0.000","2","9.828"
    "ALS1527","42WT","132.00","ALS1527-1","12","62","0","0.000","12","61.776"
    "ALS1527","42WT","132.00","ALS1527-10","5","26","0","0.000","5","25.740"
    "ALS1527","42WT","132.00","ALS1527-2","8","41","0","0.000","8","41.184"
    "ALS1527","42WT","132.00","ALS1527-3","8","41","0","0.000","8","41.184"
    "ALS1527","42WT","132.00","ALS1527-5","10","51","0","0.000","10","51.480"
    "ALS1527","42WT","132.00","ALS1527-6","10","51","0","0.000","10","51.480"
    "ALS1527","42WT","132.00","ALS1527-7","6","31","0","0.000","6","30.888"
    "ALS1527","42WT","132.00","ALS1527-8","4","21","0","0.000","4","20.592"
    "ALS1527","42WT","132.00","ALS1527-9","10","51","0","0.000","10","51.480"
    "ALS1527","42WT","98.00","ALS1527-2","6","23","0","0.000","6","22.932"
    "ALS1527","42WT","98.00","ALS1527-4","6","23","0","0.000","6","22.932"
    "ALS1527","42WT","98.00","ALS1527-6","6","23","0","0.000","6","22.932"
    "ALS1527","42WT","98.00","ALS1527-9","6","23","0","0.000","6","22.932"
    "ALS1526","33WT","112.00","ALS1526-1","5","22","0","0.000","5","21.840"
    "ALS1526","33WT","112.00","ALS1526-10","3","13","0","0.000","3","13.104"
    "ALS1526","33WT","112.00","ALS1526-2","2","9","0","0.000","2","8.736"
    "ALS1526","33WT","112.00","ALS1526-3","5","22","0","0.000","5","21.840"
    "ALS1526","33WT","112.00","ALS1526-4","4","17","0","0.000","4","17.472"
    "ALS1526","33WT","112.00","ALS1526-5","5","22","0","0.000","5","21.840"
    "ALS1526","33WT","112.00","ALS1526-6","5","22","0","0.000","5","21.840"
    "ALS1526","33WT","112.00","ALS1526-7","1","4","0","0.000","1","4.368"
    "ALS1526","33WT","112.00","ALS1526-9","5","22","0","0.000","5","21.840"
    "ALS1526","33WT","120.00","ALS1526-1","10","47","0","0.000","10","46.800"
    "ALS1526","33WT","120.00","ALS1526-10","4","19","0","0.000","4","18.720"
    "ALS1526","33WT","120.00","ALS1526-2","8","37","0","0.000","8","37.440"
    "ALS1526","33WT","120.00","ALS1526-4","6","28","0","0.000","6","28.080"
    "ALS1526","33WT","120.00","ALS1526-5","5","23","0","0.000","5","23.400"
    "ALS1526","33WT","120.00","ALS1526-6","6","28","0","0.000","6","28.080"
    "ALS1526","33WT","120.00","ALS1526-7","3","14","0","0.000","3","14.040"
    "ALS1526","33WT","120.00","ALS1526-8","5","23","0","0.000","5","23.400"
    "ALS1526","33WT","120.00","ALS1526-9","5","23","0","0.000","5","23.400"
    "ALS1526","33WT","126.00","ALS1526-1","3","15","0","0.000","3","14.742"
    "ALS1526","33WT","126.00","ALS1526-2","2","10","0","0.000","2","9.828"
    "ALS1526","33WT","126.00","ALS1526-6","2","10","0","0.000","2","9.828"
    "ALS1526","33WT","132.00","ALS1526-1","7","36","0","0.000","7","36.036"
    "ALS1526","33WT","132.00","ALS1526-10","6","31","0","0.000","6","30.888"
    "ALS1526","33WT","132.00","ALS1526-2","8","41","0","0.000","8","41.184"
    "ALS1526","33WT","132.00","ALS1526-3","15","77","0","0.000","15","77.220"
    "ALS1526","33WT","132.00","ALS1526-4","10","51","0","0.000","10","51.480"
    "ALS1526","33WT","132.00","ALS1526-5","10","51","0","0.000","10","51.480"
    "ALS1526","33WT","132.00","ALS1526-6","7","36","0","0.000","7","36.036"
    "ALS1526","33WT","132.00","ALS1526-7","6","31","0","0.000","6","30.888"
    "ALS1526","33WT","132.00","ALS1526-8","4","21","0","0.000","4","20.592"
    "ALS1526","33WT","132.00","ALS1526-9","10","51","0","0.000","10","51.480"
    "ALS1526","33WT","98.00","ALS1526-10","6","23","0","0.000","6","22.932"
    "ALS1526","33WT","98.00","ALS1526-2","6","23","0","0.000","6","22.932"
    "ALS1526","33WT","98.00","ALS1526-6","6","23","0","0.000","6","22.932"
    "ALS1525","33MP","93.00","ALS1525-1","6","22","0","0.000","6","21.762"
    "ALS1524","31NSL","93.00","ALS1524-1","6","22","0","0.000","6","21.762"
    "ALS1523","52HP","120.00","ALS1523-1","4","19","0","0.000","4","18.720"
    "ALS1523","52HP","120.00","ALS1523-2","4","19","0","0.000","4","18.720"
    "ALS1522","33XP70","112.00","ALS1522-1","10","44","0","0.000","10","43.680"
    "ALS1522","33XP70","112.00","ALS1522-2","5","22","0","0.000","5","21.840"
    "ALS1522","33XP70","120.00","ALS1522-1","10","47","0","0.000","10","46.800"
    "ALS1522","33XP70","120.00","ALS1522-2","15","70","0","0.000","15","70.200"
    "ALS1522","42XP90","120.00","ALS1522-3","20","94","0","0.000","20","93.600"
    "ALS1521","33XP65","112.00","ALS1521-1","5","22","0","0.000","5","21.840"
    "ALS1521","33XP70","112.00","ALS1521-2","5","22","0","0.000","5","21.840"
    "ALS1520","23M","111.14","ALS1520-1","20","87","0","0.000","20","87.263"
    "ALS1520","23M","92.14","ALS1520-1","5","18","0","0.000","5","18.111"
    "ALS1520","23M","97.14","ALS1520-1","15","57","0","0.000","15","57.257"
    "ALS1520","33M","111.14","ALS1520-3","5","22","0","0.000","5","21.816"
    "ALS1520","33M","131.14","ALS1520-2","20","103","0","0.000","20","102.863"
    "ALS1520","33M","131.14","ALS1520-3","10","51","0","0.000","10","51.431"
    "ALS1520","33M","97.14","ALS1520-3","5","19","0","0.000","5","19.086"
    "ALS1520","33WT","112.00","ALS1520-4","5","22","0","0.000","5","21.840"
    "ALS1520","33WT","120.00","ALS1520-4","1","5","0","0.000","1","4.680"
    "ALS1520","33WT","132.00","ALS1520-4","2","10","0","0.000","2","10.296"
    "ALS1520","42WT","112.00","ALS1520-5","5","22","0","0.000","5","21.840"
    "ALS1520","42WT","120.00","ALS1520-5","7","33","0","0.000","7","32.760"
    "ALS1519","23M","111.14","ALS1519-1","15","65","0","0.000","15","65.447"
    "ALS1519","23M","119.14","ALS1519-2","20","94","0","0.000","20","93.502"
    "ALS1519","23M","92.14","ALS1519-1","6","22","0","0.000","6","21.733"
    "ALS1518","31HP","112.00","ALS1518-2","5","22","0","0.000","5","21.840"
    "ALS1518","31HP","132.00","ALS1518-2","35","180","0","0.000","35","180.180"
    "ALS1518","31HP","93.00","ALS1518-1","6","22","0","0.000","6","21.762"
    "ALS1518","31HP","98.00","ALS1518-1","6","23","0","0.000","6","22.932"
    "ALS1517","42PCA","98.00","ALS1517-1","12","46","6","21.838","6","24.026"
    "ALS1514","33M","111.14","ALS1514-2","5","22","0","0.000","5","21.816"
    "ALS1514","33M","119.14","ALS1514-2","5","23","0","0.000","5","23.376"
    "ALS1514","33M","131.14","ALS1514-1","20","103","0","0.000","20","102.863"
    "ALS1514","33M","131.14","ALS1514-2","10","51","0","0.000","10","51.431"
    "ALS1513","23M","119.14","ALS1513-1","20","94","0","0.000","20","93.502"
    "ALS1513","23M","119.14","ALS1513-2","40","187","0","0.000","40","187.005"
    "ALS1513","23M","97.14","ALS1513-1","6","23","0","0.000","6","22.903"
    "ALS1513","23M","97.14","ALS1513-2","12","46","0","0.000","12","45.805"
    "ALS1513","26M","111.14","ALS1513-3","5","22","0","0.000","5","21.816"
    "ALS1513","26M","119.14","ALS1513-3","5","23","0","0.000","5","23.376"
    "ALS1513","26M","131.14","ALS1513-3","10","51","0","0.000","10","51.431"
    "ALS1513","33WT","112.00","ALS1513-4","5","22","0","0.000","5","21.840"
    "ALS1513","33WT","120.00","ALS1513-4","8","37","0","0.000","8","37.440"
    "ALS1513","42WT","112.00","ALS1513-5","2","9","0","0.000","2","8.736"
    "ALS1513","42WT","120.00","ALS1513-5","2","9","0","0.000","2","9.360"
    "ALS1513","42WT","98.00","ALS1513-5","3","11","0","0.000","3","11.466"
    "ALS1512","69K","120.00","ALS1512-1","10","47","0","0.000","10","46.800"
    "ALS1512","69K","132.00","ALS1512-1","10","51","0","0.000","10","51.480"
    "ALS1511","42K","112.00","ALS1511-1","5","22","0","0.000","5","21.840"
    "ALS1511","42K","120.00","ALS1511-1","15","70","0","0.000","15","70.200"
    "ALS1510","26XP55","120.00","ALS1510-1","5","23","0","0.000","5","23.400"
    "ALS1510","26XP55","132.00","ALS1510-1","15","77","0","0.000","15","77.220"
    "ALS1510","33XP70","120.00","ALS1510-2","20","94","0","0.000","20","93.600"
    "ALS1510","33XP70","120.00","ALS1510-3","10","47","0","0.000","10","46.800"
    "ALS1510","33XP70","98.00","ALS1510-3","10","38","0","0.000","10","38.220"
    "ALS1510","42XP90","120.00","ALS1510-4","20","94","0","0.000","20","93.600"
    "ALS1509","31NSL","93.00","ALS1509-1","6","22","0","0.000","6","21.762"
    "ALS1508","31HP","120.00","ALS1508-1","20","94","0","0.000","20","93.600"
    "ALS1508","31HP","132.00","ALS1508-1","40","206","0","0.000","40","205.920"
    "ALS1507","42K","132.00","ALS1507-4","20","103","0","0.000","20","102.960"
    "ALS1507","52HP","120.00","ALS1507-2","4","19","0","0.000","4","18.720"
    "ALS1507","69K","112.00","ALS1507-3","5","22","0","0.000","5","21.840"
    "ALS1507","69K","98.00","ALS1507-3","15","57","0","0.000","15","57.330"
    "ALS1506","33XP70","132.00","ALS1506-1","40","206","0","0.000","40","205.920"
    "ALS1505","26XP55","120.00","ALS1505-1","10","47","0","0.000","10","46.800"
    "ALS1505","26XP55","132.00","ALS1505-1","10","51","0","0.000","10","51.480"
    "ALS1504","26XP55","132.00","ALS1504-1","20","103","0","0.000","20","102.960"
    "ALS1500","69K","132.00","ALS1500-1","15","77","0","0.000","15","77.220"
    "ALS1500","69K","98.00","ALS1500-1","5","19","0","0.000","5","19.110"
    "ALS1499","52HP","112.00","ALS1499-2","5","22","0","0.000","5","21.840"
    "ALS1499","69K","132.00","ALS1499-1","20","103","0","0.000","20","102.960"
    "ALS1498","33XP70","112.00","ALS1498-1","20","87","0","0.000","20","87.360"
    "ALS1498","33XP70","112.00","ALS1498-2","20","87","0","0.000","20","87.360"
    "ALS1498","33XP70","120.00","ALS1498-2","20","94","0","0.000","20","93.600"
    "ALS1498","33XP70","98.00","ALS1498-2","6","23","0","0.000","6","22.932"
    "ALS1498","42XP90","112.00","ALS1498-3","15","66","0","0.000","15","65.520"
    "ALS1498","42XP90","132.00","ALS1498-3","20","103","0","0.000","20","102.960"
    "ALS1498","42XP90","98.00","ALS1498-3","5","19","2","6.714","3","12.396"
    "ALS1497","23M","111.14","ALS1497-2","20","87","0","0.000","20","87.263"
    "ALS1497","23M","119.14","ALS1497-1","40","187","0","0.000","40","187.005"
    "ALS1497","23M","119.14","ALS1497-2","40","187","0","0.000","40","187.005"
    "ALS1497","23M","131.14","ALS1497-2","40","206","0","0.000","40","205.725"
    "ALS1497","23M","92.14","ALS1497-2","6","22","0","0.000","6","21.733"
    "ALS1497","23M","97.14","ALS1497-2","18","69","0","0.000","18","68.708"
    "ALS1497","33M","111.14","ALS1497-3","10","44","0","0.000","10","43.631"
    "ALS1497","33M","97.14","ALS1497-3","10","38","0","0.000","10","38.171"
    "ALS1497","33WT","132.00","ALS1497-4","8","41","0","0.000","8","41.184"
    "ALS1497","33WT","98.00","ALS1497-4","3","11","0","0.000","3","11.466"
    "ALS1497","42WT","120.00","ALS1497-5","5","23","0","0.000","5","23.400"
    "ALS1497","42WT","98.00","ALS1497-5","4","15","0","0.000","4","15.288"
    "ALS1496","23M","119.14","ALS1496-1","20","94","20","78.200","0","15.302"
    "ALS1496","23M","125.14","ALS1496-2","12","59","0","0.000","12","58.909"
    "ALS1496","23M","131.14","ALS1496-2","20","103","0","0.000","20","102.863"
    "ALS1495","31HP","120.00","ALS1495-1","20","94","0","0.000","20","93.600"
    "ALS1495","31HP","120.00","ALS1495-2","15","70","0","0.000","15","70.200"
    "ALS1495","31HP","120.00","ALS1495-3","15","70","0","0.000","15","70.200"
    "ALS1495","31HP","120.00","ALS1495-4","15","70","0","0.000","15","70.200"
    "ALS1495","31HP","126.00","ALS1495-2","5","25","0","0.000","5","24.570"
    "ALS1495","31HP","126.00","ALS1495-3","5","25","0","0.000","5","24.570"
    "ALS1495","31HP","126.00","ALS1495-4","5","25","0","0.000","5","24.570"
    "ALS1495","31HP","132.00","ALS1495-2","20","103","0","0.000","20","102.960"
    "ALS1495","31HP","132.00","ALS1495-3","40","206","0","0.000","40","205.920"
    "ALS1495","31HP","132.00","ALS1495-4","40","206","0","0.000","40","205.920"
    "ALS1493","23M","97.14","ALS1493-1","18","69","18","55.913","0","12.795"
    "ALS1492","69K","112.00","ALS1492-1","5","22","0","0.000","5","21.840"
    "ALS1492","69K","120.00","ALS1492-1","2","9","0","0.000","2","9.360"
    "ALS1492","69K","132.00","ALS1492-1","8","41","0","0.000","8","41.184"
    "ALS1492","69K","98.00","ALS1492-1","5","19","0","0.000","5","19.110"
    "ALS1491","26XP55","120.00","ALS1491-1","6","28","0","0.000","6","28.080"
    "ALS1491","26XP55","132.00","ALS1491-1","7","36","0","0.000","7","36.036"
    "ALS1491","26XP55","98.00","ALS1491-1","7","27","0","0.000","7","26.754"
    "ALS1491","42XP90","112.00","ALS1491-2","15","66","0","0.000","15","65.520"
    "ALS1491","42XP90","98.00","ALS1491-2","5","19","0","0.000","5","19.110"
    "ALS1490","23M","131.14","ALS1490-1","20","103","0","0.000","20","102.863"
    "ALS1487","23M","125.14","ALS1487-2","8","39","7","29.119","1","10.154"
    "ALS1487","23M","131.14","ALS1487-4","20","103","0","0.000","20","102.863"
    "ALS1487","23M","97.14","ALS1487-4","6","23","0","0.000","6","22.903"
    "ALS1486","23M","131.14","ALS1486-2","35","180","0","0.000","35","180.009"
    "ALS1486","26M","131.14","ALS1486-3","5","26","0","0.000","5","25.716"
    "ALS1483","42K","98.00","ALS1483-2","6","23","0","0.000","6","22.932"
    "ALS1482","42K","132.00","ALS1482-1","20","103","0","0.000","20","102.960"
    "ALS1482","52HP","98.00","ALS1482-3","6","23","0","0.000","6","22.932"
    "ALS1482","69K","132.00","ALS1482-4","4","21","0","0.000","4","20.592"
    "ALS1481","33XP70","120.00","ALS1481-2","20","94","0","0.000","20","93.600"
    "ALS1481","33XP70","120.00","ALS1481-3","40","187","0","0.000","40","187.200"
    "ALS1481","33XP70","120.00","ALS1481-4","20","94","0","0.000","20","93.600"
    "ALS1481","33XP70","126.00","ALS1481-3","10","49","0","0.000","10","49.140"
    "ALS1481","33XP70","132.00","ALS1481-3","10","51","0","0.000","10","51.480"
    "ALS1481","42XP90","112.00","ALS1481-5","10","44","0","0.000","10","43.680"
    "ALS1481","42XP90","98.00","ALS1481-5","10","38","0","0.000","10","38.220"
    "ALS1471","42K","132.00","ALS1471-1","20","103","0","0.000","20","102.960"
    "ALS1469","33XP70","120.00","ALS1469-5","10","47","10","40.839","0","5.961"
    "ALS1469","33XP70","132.00","ALS1469-5","10","51","0","0.000","10","51.480"
    "ALS1467","23M","125.14","ALS1467-1","4","20","2","7.880","2","11.756"
    "ALS1467","23M","125.14","ALS1467-2","8","39","0","0.000","8","39.273"
    "ALS1467","23M","131.14","ALS1467-2","20","103","0","0.000","20","102.863"
    "ALS1462","42K","132.00","ALS1462-2","40","206","0","0.000","40","205.920"
    "ALS1456","23M","131.14","ALS1456-4","20","103","20","86.347","0","16.515"
    "ALS1443","23M","97.14","ALS1443-3","6","23","1","3.052","5","19.850"
    "","","NaN","","2,474","11626","86","329.904","2,388","11295.886"
    attached snapshot of the excel
    Attached Files
    Last edited by mabboud; 19 Jul 2018, 12:33.

    #2
    here is a trimmed down html of the exact same issue

    Code:
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="rollstock.css">
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
    <SCRIPT>window.isc_useSimpleNames = false; var isomorphicDir='../isomorphic/';</SCRIPT>
    <SCRIPT SRC="../isomorphic/system/modules/ISC_Core.js"></script>
    <SCRIPT SRC="../isomorphic/system/modules/ISC_Foundation.js"></script>
    <SCRIPT SRC="../isomorphic/system/modules/ISC_Containers.js"></script>
    <SCRIPT SRC="../isomorphic/system/modules/ISC_Grids.js"></script>
    <SCRIPT SRC="../isomorphic/system/modules/ISC_Forms.js"></script>
    <SCRIPT SRC="../isomorphic/system/modules/ISC_DataBinding.js"></script>
    <SCRIPT SRC="../isomorphic/skins/Enterprise/load_skin.js"></script>
    </head>
    <body>
    
    <script> 
    isc.SimpleType.create({
        name: 'Roll.initialWeight.bigWeight',
        inheritsFrom: "float",
        normalDisplayFormatter: function (value) {
            // Converting Pounds to Tons
            return isc.NumberUtil.format(value / 2000.0,",0.000");
        },
        shortDisplayFormatter: function (value) { 
            return this.normalDisplayFormatter(value);
        },
        getGroupTitle: function (value, record, field, fieldName, component){
            return this.normalDisplayFormatter(value);
        }
    });
    isc.SimpleType.create({
        name: 'RollstockOrderItem.tonsPerRoll.weight',
        inheritsFrom: "float",
        normalDisplayFormatter: function (value) {
            var v = isc.NumberUtil.format(value,",0.000");
            return v;
        },
        shortDisplayFormatter: function (value) { 
            return this.normalDisplayFormatter(value);
        },
        getGroupTitle: function (value, record, field, fieldName, component){
            return this.normalDisplayFormatter(value);
        }
    });
    isc.SimpleType.create({
        name: 'RollstockOrderItem.width.lineal',
        inheritsFrom: "float",
        normalDisplayFormatter: function (value) {
            // Display in Inces and Decimal Sixteenths
            var v = Math.floor(value) + Math.round((value - Math.floor(value))*16)/100.0;
            v = isc.NumberUtil.format(v,",0.00");
            return v;
        },
        shortDisplayFormatter: function (value) { 
            return this.normalDisplayFormatter(value);
        },
        getGroupTitle: function (value, record, field, fieldName, component){
            return this.normalDisplayFormatter(value);
        }
    });
    
    
    
    isc.RestDataSource.create({
        ID: 'openRollstockOrders',
        dataURL: 'rollstockOrder',
        fields:[
            { name: "rollstockOrderKey",hidden:true },
            { name: "orderNumber",title: ('orderNumber')},
            { name: "rollstockOrderItemKey", primaryKey:true, hidden:true},
            { name: "paperCode", title: ('paperCode'),foreignKey: "paper.paperCode" , allowEmptyValue:false,required: true,type:"select", displayField:"paperCode"},
            { name: "width", title: ('width'), type: 'RollstockOrderItem.width.lineal', required: true, allowEmptyValue:false},
            { name: "numberRollsOrdered", title: ('numRolls'), type: 'float',format:',0',required: true  },
            { name: 'tonsPerRoll', title: ('tonsOrdered'), type: 'RollstockOrderItem.tonsPerRoll.weight' },
            { name: "supplierOrderNumber",title: ('supplierOrderNumber')},
            { name: "dueDate",title: ('dueDate'),type:"date", useTextField:true,required: true},
            { name: 'lineNumber', title: ('lineNumber'), type: 'integer' },
            { name: 'price', title: ('price'), type: 'float' ,decimalPad: 4},
            { name: "itemDateOrdered",title: ('itemDateOrdered'),type:"date", useTextField:true},
            { name: 'rollsReceived', title: ('rollsReceived'), type: 'float',format:',0'  },
            { name: 'weightReceived', title: ('weightReceived'), type: 'Roll.initialWeight.bigWeight' },
            { name: 'rollsRemaining', title: ('rollsRemaining'), type: 'float',format:',0'  },
            { name: 'weightRemaining', title: ('weightRemaining'), type: 'Roll.initialWeight.bigWeight'},
            { name: 'intransitCount', title: ('intransitCount'), type: 'float',format:',0'  },
            { name: "printed",title: ('printed'), type:'boolean'}
        ]
    });
    
    function refreshTable(){
        invTable.invalidateCache();
        invTable.fetchData();
    }
    
    isc.DynamicForm.create({
        ID: "exportForm",
        width:300,
        fields: [
            { name: "exportType", title: "Export Type", type:"select", width:"*",
                defaultToFirstOption: true,
                valueMap: { 
                    "csv" : "CSV" , 
                    "xml" : "XML", 
                    "json" : "JSON",
                    "xls" : "XLS (Excel97)",
                    "ooxml" : "OOXML (Excel2007)"
                }
            },
            { name: "showInWindow", title: "Show in Window", type: "boolean", align:"left" }
        ]
    });
    
    isc.Button.create({
       ID: "exportButton",
       title: "Export",
       autoDraw:false,
       click: function () {
           var exportAs = exportForm.getField("exportType").getValue();
           var showInWindow = exportForm.getField("showInWindow").getValue();
           if (exportAs == "json") {
               // JSON exports are server-side only, so use the OperationBinding on the DataSource
               invTable.exportData({ operationId: "customJSONExport", 
                   exportDisplay: showInWindow ? "window" : "download"});
           } else {
               // exportAs is not JSON, so we can set that with requestProperties
               invTable.exportClientData({ exportAs: exportAs,
                   exportDisplay: showInWindow ? "window" : "download"
               });
           }
       }
    });
    
    isc.ListGrid.create({
        ID: 'invTable',
        width: '100%',
        height: '100%',
        dataSource: 'openRollstockOrders',
        autoDraw:false
    });
    
    isc.ImgButton.create({
        ID:"refreshButton",
        title:('refresh'),
        autoDraw:false,
        src:"general_refresh.png", size:16,
        showFocused:false, showRollOver:false, showDown:false,
        click :function(){
            refreshTable();
        }
    
    });
    
    
    isc.SectionStack.create({
        ID: "sectionStack",
        visibilityMode: 'multiple',
        width: '100%',
        height: '100%',
        autoDraw:true,
        sections: [
            {     title: ('openOrders'),controls:[refreshButton,exportButton],
                autoShow: true,
                canCollapse: false,
                items: [exportForm,invTable ]
            }
        ]
    })
    
    refreshTable();
    
    </script>
    </body>
    </html>

    Comment


      #3
      i have managed to develop a test case with some sample data

      Code:
      <html>
      <head> 
      <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
      <SCRIPT>window.isc_useSimpleNames = false; var isomorphicDir='../isomorphic/';</SCRIPT>
      <SCRIPT SRC="../isomorphic/system/modules/ISC_Core.js"></script>
      <SCRIPT SRC="../isomorphic/system/modules/ISC_Foundation.js"></script>
      <SCRIPT SRC="../isomorphic/system/modules/ISC_Containers.js"></script>
      <SCRIPT SRC="../isomorphic/system/modules/ISC_Grids.js"></script>
      <SCRIPT SRC="../isomorphic/system/modules/ISC_Forms.js"></script>
      <SCRIPT SRC="../isomorphic/system/modules/ISC_DataBinding.js"></script>
      <SCRIPT SRC="../isomorphic/skins/Enterprise/load_skin.js"></script>
      </head>
      <body>
      
      <script> 
      isc.SimpleType.create({
          name: 'Roll.initialWeight.bigWeight',
          inheritsFrom: "float",
          normalDisplayFormatter: function (value) {
              // Converting Pounds to Tons
              return isc.NumberUtil.format(value / 2000.0,",0.000");
          },
          shortDisplayFormatter: function (value) { 
              return this.normalDisplayFormatter(value);
          },
          getGroupTitle: function (value, record, field, fieldName, component){
              return this.normalDisplayFormatter(value);
          }
      });
      isc.SimpleType.create({
          name: 'RollstockOrderItem.tonsPerRoll.weight',
          inheritsFrom: "float",
          normalDisplayFormatter: function (value) {
              var v = isc.NumberUtil.format(value,",0.000");
              return v;
          },
          shortDisplayFormatter: function (value) { 
              return this.normalDisplayFormatter(value);
          },
          getGroupTitle: function (value, record, field, fieldName, component){
              return this.normalDisplayFormatter(value);
          }
      });
      isc.SimpleType.create({
          name: 'RollstockOrderItem.width.lineal',
          inheritsFrom: "float",
          normalDisplayFormatter: function (value) {
              // Display in Inces and Decimal Sixteenths
              var v = Math.floor(value) + Math.round((value - Math.floor(value))*16)/100.0;
              v = isc.NumberUtil.format(v,",0.00");
              return v;
          },
          shortDisplayFormatter: function (value) { 
              return this.normalDisplayFormatter(value);
          },
          getGroupTitle: function (value, record, field, fieldName, component){
              return this.normalDisplayFormatter(value);
          }
      });
      
      var testData = 
      [
          {
              orderNumber:"ALS1512",
              paperCode:"23M",
              width:112.857,
              numberRollsOrdered:10,
              tonsPerRoll:51.48,
              supplierOrderNumber:"ALS1512-1",
              dueDate:new Date(1461124800000),
              lineNumber:1,
              price:20.5300,
              itemDateOrdered:new Date(1458238525000),
              rollsReceived:2,
              weightReceived:10331,
              rollsRemaining:10,
              weightRemaining:104530,
              intransitCount:0,
              printed:"true"
          },
          {
              orderNumber:"ALS1512",
              paperCode:"69K",
              width:132.00,
              numberRollsOrdered:10,
              tonsPerRoll:51.48,
              supplierOrderNumber:"ALS1512-1",
              dueDate:new Date(1461124800000),
              lineNumber:1,
              price:20.5300,
              itemDateOrdered:new Date(1458238525000),
              rollsReceived:0,
              weightReceived:0,
              rollsRemaining:10,
              weightRemaining:102960,
              intransitCount:0,
              printed:"true"
          }
      ];
      
      isc.RestDataSource.create({
          ID: 'openRollstockOrders',
          testData:testData,
          clientOnly: true,
          fields:[
              { name: "rollstockOrderKey",hidden:true },
              { name: "orderNumber",title: ('orderNumber')},
              { name: "rollstockOrderItemKey", primaryKey:true, hidden:true},
              { name: "paperCode", title: ('paperCode'),foreignKey: "paper.paperCode" , allowEmptyValue:false,required: true,type:"select", displayField:"paperCode"},
              { name: "width", title: ('width'), type: 'RollstockOrderItem.width.lineal', required: true, allowEmptyValue:false},
              { name: "numberRollsOrdered", title: ('numRolls'), type: 'float',format:',0',required: true  },
              { name: 'tonsPerRoll', title: ('tonsOrdered'), type: 'RollstockOrderItem.tonsPerRoll.weight' },
              { name: "supplierOrderNumber",title: ('supplierOrderNumber')},
              { name: "dueDate",title: ('dueDate'),type:"date", useTextField:true,required: true},
              { name: 'lineNumber', title: ('lineNumber'), type: 'integer' },
              { name: 'price', title: ('price'), type: 'float' ,decimalPad: 4},
              { name: "itemDateOrdered",title: ('itemDateOrdered'),type:"date", useTextField:true},
              { name: 'rollsReceived', title: ('rollsReceived'), type: 'float',format:',0'  },
              { name: 'weightReceived', title: ('weightReceived'), type: 'Roll.initialWeight.bigWeight' },
              { name: 'rollsRemaining', title: ('rollsRemaining'), type: 'float',format:',0'  },
              { name: 'weightRemaining', title: ('weightRemaining'), type: 'Roll.initialWeight.bigWeight'},
              { name: 'intransitCount', title: ('intransitCount'), type: 'float',format:',0'  },
              { name: "printed",title: ('printed'), type:'boolean'}
          ]
      });
      
      function refreshTable(){
          invTable.invalidateCache();
          invTable.fetchData();
      }
      
      isc.DynamicForm.create({
          ID: "exportForm",
          width:300,
          fields: [
              { name: "exportType", title: "Export Type", type:"select", width:"*",
                  defaultToFirstOption: true,
                  valueMap: { 
                      "csv" : "CSV" , 
                      "xml" : "XML", 
                      "json" : "JSON",
                      "xls" : "XLS (Excel97)",
                      "ooxml" : "OOXML (Excel2007)"
                  }
              },
              { name: "showInWindow", title: "Show in Window", type: "boolean", align:"left" }
          ]
      });
      
      isc.Button.create({
         ID: "exportButton",
         title: "Export",
         autoDraw:false,
         click: function () {
             var exportAs = exportForm.getField("exportType").getValue();
             var showInWindow = exportForm.getField("showInWindow").getValue();
             if (exportAs == "json") {
                 // JSON exports are server-side only, so use the OperationBinding on the DataSource
                 invTable.exportData({ operationId: "customJSONExport", 
                     exportDisplay: showInWindow ? "window" : "download"});
             } else {
                 // exportAs is not JSON, so we can set that with requestProperties
                 invTable.exportClientData({ exportAs: exportAs,
                     exportDisplay: showInWindow ? "window" : "download"
                 });
             }
         }
      });
      
      isc.ListGrid.create({
          ID: 'invTable',
          width: '100%',
          height: '100%',
          dataSource: 'openRollstockOrders',
          autoDraw:false
      });
      
      isc.ImgButton.create({
          ID:"refreshButton",
          title:('refresh'),
          autoDraw:false,
          src:"general_refresh.png", size:16,
          showFocused:false, showRollOver:false, showDown:false,
          click :function(){
              refreshTable();
          }
      
      });
      
      
      isc.SectionStack.create({
          ID: "sectionStack",
          visibilityMode: 'multiple',
          width: '100%',
          height: '100%',
          autoDraw:true,
          sections: [
              {     title: ('openOrders'),controls:[refreshButton,exportButton],
                  autoShow: true,
                  canCollapse: false,
                  items: [exportForm,invTable ]
              }
          ]
      })
      
      refreshTable();
      
      </script>
      </body>
      </html>

      Comment


        #4
        any updates on this issue ?

        Comment


          #5
          Thank you for the report and test case. We'll follow up here when this is fixed.

          Comment


            #6
            There's no bug here. Formatter you are using is not supposed to change field value. Please consider using formula field to change field value and a format like shown below.
            Code:
            { name: 'weightReceived2', userFormula: { formulaVars: {A: "weightReceived"}, text: "A / 2000.0"}, format: ",0.000"}
            Let us know please how this worked for you.

            Comment


              #7
              i would like to maintain using the SimpleType formatting since my databases values have different unit than user Display unit ... which can be configured on a user by user bases and doing it your way will limit how i can customize my display unit ... with the SimpleType am actually traversing through the type to look up the Database unit and Display unit which will give me what i wanted ... its not always static like the way you have it and will have a lot of duplicate code and really hard to maintain ... this Test case only an example that the export Excel is not reflecting what we are seeing on the ListGrid ... CSV and XML do show correctly

              my Datasource type will define what is the Unit that will be displayed and in what format.
              this is an actual example of my SimpleType:
              Code:
              isc.SimpleType.create({
                     name: ds.fields[i].type,
                     inheritsFrom: "float",
                     normalDisplayFormatter: function (value) {
                            return avista.formattedFieldConvert(value, table, field, measure);
                     },
                     shortDisplayFormatter: function (value) { 
                            return this.normalDisplayFormatter(value);
                     },
                     getGroupTitle: function (value, record, field, fieldName, component){
                            return this.normalDisplayFormatter(value);
                     },
                     editorType: "UOMItem"
              });

              this code will call the formattedFieldConvert function
              Code:
              this.formattedFieldConvert = function(value, table, field, measure)
                  {
                      var dbUOM = avista.getDatabaseUOM(table, field, measure);
                      var dpUOM = avista.getDisplayUOM(table, field, measure);
                      var dpFormat = avista.getDisplayFormat(table, field, measure);
                      var cvrValue = avista.unitConvert(value, dbUOM, dpUOM);
                      return isc.NumberUtil.format(cvrValue,dpFormat);
                  }
              which then it gets converted and formatted to the desired Display unit which is configured in the database that gets preloaded at the start of the application

              Comment


                #8
                i have another test case that it works with the SimpleType export to Excel but i cant tell why this one works and my first test case doesnt

                Code:
                
                <html>
                <head>
                <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
                <SCRIPT>window.isc_useSimpleNames = false; var isomorphicDir='../isomorphic/';</SCRIPT>
                <SCRIPT SRC="../isomorphic/system/modules/ISC_Core.js">
                </script><SCRIPT SRC="../isomorphic/system/modules/ISC_Foundation.js">
                </script><SCRIPT SRC="../isomorphic/system/modules/ISC_Containers.js">
                </script><SCRIPT SRC="../isomorphic/system/modules/ISC_Grids.js"></script>
                <SCRIPT SRC="../isomorphic/system/modules/ISC_Forms.js"></script>
                <SCRIPT SRC="../isomorphic/skins/Enterprise/load_skin.js"></script>
                <SCRIPT SRC="../isomorphic/system/modules/ISC_DataBinding.js"></script>
                </head>
                <body>
                <script>
                
                isc.SimpleType.create({
                    name: "msfUOM",
                    inheritsFrom: "float",
                    normalDisplayFormatter: function (value) {
                        var v = isc.NumberUtil.format(value/0.092903/1000.0,",0.00");
                        return v;
                    },
                    shortDisplayFormatter: function (value) { 
                        return this.normalDisplayFormatter(value);
                    }
                });
                
                countryData = [
                {
                    continent:"North America",
                    countryName:"United States",
                    countryCode:"US",
                    area:9631420,
                    population:298444215,
                    gdp:12360.0,
                    independence:new Date(1776,6,4),
                    government:"federal republic",
                    government_desc:2,
                    capital:"Washington, DC",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/United_states"
                },
                {
                    continent:"Asia",
                    countryName:"China",
                    countryCode:"CH",
                    area:9596960,
                    population:1313973713,
                    gdp:8859.0,
                    government:"Communist state",
                    government_desc:0,
                    capital:"Beijing",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/China"
                },
                {
                    continent:"Asia",
                    countryName:"Japan",
                    countryCode:"JA",
                    area:377835,
                    population:127463611,
                    gdp:4018.0,
                    government:"constitutional monarchy with parliamentary government",
                    government_desc:1,
                    capital:"Tokyo",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/Japan"
                },
                {
                    continent:"Asia",
                    countryName:"India",
                    countryCode:"IN",
                    area:3287590,
                    population:1095351995,
                    gdp:3611.0,
                    independence:new Date(1947,7,15),
                    government:"federal republic",
                    government_desc:2,
                    capital:"New Delhi",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/India"
                },
                {
                    continent:"Europe",
                    countryName:"Germany",
                    countryCode:"GM",
                    area:357021,
                    population:82422299,
                    gdp:2504.0,
                    independence:new Date(1871,0,18),
                    government:"federal republic",
                    government_desc:2,
                    capital:"Berlin",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/Germany"
                },
                {
                    continent:"Europe",
                    countryName:"United Kingdom",
                    countryCode:"UK",
                    area:244820,
                    population:60609153,
                    gdp:1830.0,
                    independence:new Date(1801,0,1), 
                    government:"constitutional monarchy",
                    government_desc:1,
                    capital:"London",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/United_kingdom"
                },
                {
                    continent:"Europe",
                    countryName:"France",
                    countryCode:"FR",
                    area:547030,
                    population:60876136,
                    gdp:1816.0,
                    government:"republic",
                    government_desc:5,
                    capital:"Paris",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/France"
                },
                {
                    continent:"Europe",
                    countryName:"Italy",
                    countryCode:"IT",
                    area:301230,
                    population:58133509,
                    gdp:1698.0,
                    independence:new Date(1861,2,17),
                    government:"republic",
                    government_desc:5,
                    capital:"Rome",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/Italy"
                },
                {
                    continent:"Asia",
                    countryName:"Russia",
                    countryCode:"RS",
                    area:17075200,
                    population:142893540,
                    gdp:1589.0,
                    independence:new Date(1991,7,24),
                    government:"federation",
                    government_desc:3,
                    capital:"Moscow",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/Russia"
                },
                {
                    continent:"South America",
                    countryName:"Brazil",
                    countryCode:"BR",
                    area:8511965,
                    population:188078227,
                    gdp:1556.0,
                    independence:new Date(1822,8,7),
                    government:"federative republic",
                    government_desc:3,
                    capital:"Brasilia",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/Brazil"
                },
                {
                    continent:"North America",
                    countryName:"Canada",
                    countryCode:"CA",
                    area:9984670,
                    population:33098932,
                    gdp:1114.0,
                    independence:new Date(1867,6,1),
                    government:"constitutional monarchy with parliamentary democracy and federation",
                    government_desc:1,
                    capital:"Ottawa",
                    member_g8:true,
                    article:"http://en.wikipedia.org/wiki/Canada"
                },
                {
                    continent:"North America",
                    countryName:"Mexico",
                    countryCode:"MX",
                    area:1972550,
                    population:107449525,
                    gdp:1067.0,
                    independence:new Date(1810,8,16),
                    government:"federal republic",
                    government_desc:2,
                    capital:"Mexico (Distrito Federal)",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/Mexico"
                },
                {
                    continent:"Europe",
                    countryName:"Spain",
                    countryCode:"SP",
                    area:504782,
                    population:40397842,
                    gdp:1029.0,
                    independence:new Date(1492,0,1),
                    government:"parliamentary monarchy",
                    government_desc:4,
                    capital:"Madrid",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/Spain"
                },
                {
                    continent:"Asia",
                    countryName:"South Korea",
                    countryCode:"KS",
                    area:98480,
                    population:48846823,
                    gdp:965.3,
                    independence:new Date(1945,7,15),
                    government:"republic",
                    government_desc:5,
                    capital:"Seoul",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/South_korea"
                },
                {
                    continent:"Asia",
                    countryName:"Indonesia",
                    countryCode:"ID",
                    area:1919440,
                    population:245452739,
                    gdp:865.6,
                    independence:new Date(1945,7,17),
                    government:"republic",
                    government_desc:5,
                    capital:"Jakarta",
                    member_g8:false,
                    article:"http://en.wikipedia.org/wiki/Indonesia"
                }
                
                ];
                
                isc.RestDataSource.create({
                    ID: 'countryDS',
                    clientOnly: true,
                    testData: countryData,
                    fields:[
                        { name: "continent"},
                        { name: "countryName"},
                        { name: "area", title: ('area'), type: 'msfUOM', required: true, allowEmptyValue:false},
                        { name: "population", title: ('population'), type: 'float',format:',0',required: true  },
                        { name: 'gdp', title: ('gdp')},
                        { name: "government",title: ('government')},
                        { name: "independence",title: ('independence'),type:"date", useTextField:true,required: true},
                        { name: 'capital', title: ('capital'), type: 'integer' },
                        { name: 'member_g8', title: ('member_g8'), type: 'boolean'},
                        { name: "article",title: ('article')}
                    ]
                });
                
                
                isc.ListGrid.create({
                    ID: "countryList",
                    width:500, height:250, top:70,
                    autoFetchData: true,
                    dataSource: countryDS,
                    fields:[
                        {name:"countryName", title:"Country"},
                        {name:"population", title:"Population", format:",0"},
                        {name:"area", title:"Area (1000 ft&sup2;)"}
                    ],
                    // initial sort on Population, high-to-low
                    sortField: 2,
                    sortDirection: "descending"
                });
                
                isc.DynamicForm.create({
                    ID: "exportForm",
                    width:300,
                    fields: [
                        { name: "exportType", title: "Export Type", type:"select", width:"*",
                            defaultToFirstOption: true,
                            valueMap: { 
                                "csv" : "CSV" , 
                                "xml" : "XML", 
                                "json" : "JSON",
                                "xls" : "XLS (Excel97)",
                                "ooxml" : "OOXML (Excel2007)"
                            }
                        },
                        { name: "showInWindow", title: "Show in Window", type: "boolean", align:"left" },
                        { name: "exportRawValues", title: "Raw Values", type: "boolean", align:"left" }
                    ]
                });
                
                isc.Button.create({
                   ID: "exportButton",
                   title: "Export",
                   left: 320,
                   click: function () {
                       var exportAs = exportForm.getField("exportType").getValue();
                       var showInWindow = exportForm.getField("showInWindow").getValue();
                       var exportRawValues = exportForm.getField("exportRawValues").getValue();
                       if (exportAs == "json") {
                           // JSON exports are server-side only, so use the OperationBinding on the DataSource
                           countryList.exportData({ operationId: "customJSONExport", 
                               exportDisplay: showInWindow ? "window" : "download"});
                       } else {
                           // exportAs is not JSON, so we can set that with requestProperties
                           countryList.exportClientData({ exportAs: exportAs, exportRawValues:exportRawValues,
                               exportDisplay: showInWindow ? "window" : "download"
                           });
                       }
                   }
                });
                
                
                </script>
                </body>
                </html>

                Comment


                  #9
                  Any updates on this matter?

                  Comment


                    #10
                    Hello Isomorphic ...

                    are you looking into this issue ?

                    Comment


                      #11
                      any updates on this ?

                      Comment


                        #12
                        Sorry for the long silence here. We have a fix in progress on this and will follow up when it's available for you to work with.

                        Comment


                          #13
                          We have added a new property ListGrid.exportRawNumbers and ListGridField.exportRawNumbers that you can set to explicit false on the field or on the listGrid to get the behavior you want (show the formatted value rather than the raw value in excel export).

                          These changes will be available as of the next nightly build, dated October 05.

                          Regards
                          Isomorphic Software

                          Comment

                          Working...
                          X