Announcement

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

  • sonia_v
    replied
    Hello Isomorphic,

    Thank you for your support.

    Regards,

    Sonia

    Leave a comment:


  • Isomorphic
    replied
    This was fixed on the 5.0p branch over the weekend, and will be present in today's builds (5.0 / 10.0 only). We will apply the fix to more recent branches today.

    Leave a comment:


  • sonia_v
    replied

    Hello Isomorphic,

    It seems that the fix provided by (built 2018-06-19), resolves the title issue in Clientside export, but it causes an error when exporting a hidden ListGridField (functionality provided by build 2018-05-23).

    I have reproduced the error and attached the updated Showcase Sample - "FormattedExportSample.java".

    Here I have made a small change by a call to setHidden(true);

    ListGridField quantityField = new ListGridField("quantity","Qty");
    quantityField.setWidth(48);
    quantityField.setHidden(true);

    After my change, export doesn't work at all in Showcase and throws a JavaScriptException :

    17:58:48.696:MUP3:WARN:Log:com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'exportTitle' of null
    at wrap_1_g$(showcase-0.js@5:42923)
    at doFire_0_g$(showcase-0.js@20:34670)
    at fireEvent_1_g$(showcase-0.js@8:34740)
    at fireEvent_0_g$(showcase-0.js@24:34518)
    at fireEvent_4_g$(showcase-0.js@30:49879)
    at anonymous(showcase-0.js@16:87617)
    at apply_0_g$(showcase-0.js@28:10845)
    at entry0_0_g$(showcase-0.js@16:10901)
    at anonymous(showcase-0.js@14:10881)
    at obj_0_g$.click(showcase-0.js@22:87641)
    at isc_StatefulCanvas_handleActivate(http://127.0.0.1:8888/showcase/sc/mo...0.0.js@108:231)
    at isc_StatefulCanvas_handleClick(http://127.0.0.1:8888/showcase/sc/mo...10.0.js@13:232)
    at isc_c_EventHandler_bubbleEvent(http://127.0.0.1:8888/showcase/sc/mo...0.0.js@89:1601)
    at isc_c_EventHandler_handleClick(http://127.0.0.1:8888/showcase/sc/mo...0.0.js@50:1460)
    at isc_c_EventHandler__handleMouseUp(http://127.0.0.1:8888/showcase/sc/mo...0.0.js@11:1445)
    at isc_c_EventHandler_handleMouseUp(http://127.0.0.1:8888/showcase/sc/mo...0.0.js@57:1436)
    at isc_c_EventHandler_dispatch(http://127.0.0.1:8888/showcase/sc/mo....0.js@108:1679)
    at eval(eval at isc__makeFunction (http://127.0.0.1:8888/showcase/sc/mo...10.0.js@122:76)

    Please check the issue and provide a fix for it.
    Thank you for your support in advance.

    Regards,

    Sonia
    Attached Files

    Leave a comment:


  • Isomorphic
    replied
    This issue is now fixed. The fix will be present in tomorrow's builds (those dated July 19) of 5.0 / 10.0 and greater

    Leave a comment:


  • Isomorphic
    replied
    We're looking at it today

    Leave a comment:


  • svashi
    replied
    Hello Isomorphic,

    Any updates on this title issue.
    Thanks in advance for your support.

    Regards,

    Sonia

    ​​​​​​​

    Leave a comment:


  • Isomorphic
    replied
    Thank you for the example case - we do see the issue, and an engineer is scheduled to look into it. We will report back on this thread soon when the issue is resolved.

    Regards,
    Isomorphic Software Support

    Leave a comment:


  • svashi
    replied
    Hello Isomorphic,

    I am able to reproduce it using showcase sample code - com.smartgwt.sample.showcase.client.dataintegration.java.others.FormattedExportSample

    I have made the following changes in sample code :
    As I discussed in my first post that we are using a button to load data into grid based on some criteria.
    The other changes are:
    1 - changed the title of "orderDateField" ListGridField to "Date" instead of default "Order Date"

    ListGridField orderDateField = new ListGridField("orderDate");
    orderDateField.setTitle("Date");

    2 - using setExportFields()
    dsRequestProperties.setExportFields(new String[]{"orderID","itemID","quantity","orderDate","itemTotalField"});

    The final version of sample after all these changes is attached.

    Now when I exported as XLS/XSLX (as well as other formats) it shows the the following column titles :

    Order ID, Item ID , Quantity, Order Date , itemTotalField

    - here the "Item ID" is prettified internal field name (in grid it shows "Item Name")
    - "Quantity" is the prettified internal field name (in grid it shows "Qty")
    - "Order Date" is the prettified internal field name, and in code the title is set as "Date" (in grid it shows "Order")
    - "itemTotalField" is the raw internal field name (in grid it shows "Item Total")

    instead of (according to the grid):
    Order ID , Item Name , Qty , Date , Item Total

    Thanks in advance for your support.

    Regards,

    Sonia FormattedExportSample.java

    Leave a comment:


  • Isomorphic
    replied
    In our internal tests, we are explicitly testing for specified titles (as opposed to the derived titles you describe) on exports directly on dataSources and on both databound and unbound listGrids, and, in the case of a bound listGrid, with titles specified in the DataSource and overridden at the listGrid level. In all of these cases, we get the true titles exported as we expect. We would only expect to see a derived title like "Internal Id" if no proper title was provided for a field.

    So in short, we do not reproduce this problem and we would need a complete, minimal concrete test case to investigate it further

    Regards,
    Isomorphic Software Support

    Leave a comment:


  • svashi
    replied
    Hello Isomorphic,

    Thank you for the fix.
    But it shows the capitalised and space separated internal field names not the field titles.
    For example - if internal field name is "internalId" then it shows "Internal Id" as column title in export file.

    Thanks & Regards,

    Sonia

    Leave a comment:


  • Isomorphic
    replied
    But in export file - the column titles are named as internal field names instead of field titles (localized)
    This issue should be resolved in today's build (ie, the build that will appear on the website later today, dated May 30). Please try it and let us know if you still see the issue.

    Leave a comment:


  • Isomorphic
    replied
    Today is a holiday in the US and very few business hours have elapsed since you reported that issue, please allow reasonable time.

    Note: if you provide numeric formats via listGridField.format/exportFormat, those are sent to the server and translated into Excel formats. So this could both simplify your code and get your formats working in Excel.

    Leave a comment:


  • svashi
    replied
    Hello Isomorphic,

    Any updates on the titles issue.

    Thanks & Regards,

    Sonia

    Leave a comment:


  • Isomorphic
    replied
    What you're running into is an intended behavior, or at least, it's the best we can with Excel's quirks.

    If we give Excel a formatted number like "500,000" it will not treat that value as a number, so sums are other basic spreadsheet features won't work. So we use the heuristic that if your formatted value parses as a number, you probably want it treated as a number in the spreadsheet, so we give Excel the unformatted numeric value and tell Excel it's a numeric data value.

    You might expect that we would give Excel *both* the formatted value and the numeric value, but this is only possible by creating what's called a "custom format" for that cell, and Excel is limited to a very small number of these.

    With this Excel limitation in mind, we expect you'll want to stay with our behavior here. If not, one approach would be to change the field to string type (perhaps just for export, so that sorts, etc still work as expected).

    We're check on the titles issue.

    Leave a comment:


  • svashi
    replied
    Hello Isomorphic,

    I am able to reproduce the first issue(related to cell formatting).
    In the showcase sample code - com.smartgwt.sample.showcase.client.dataintegration.java.others.FormattedExportSample
    I am using CellFormatter for "Qty" ListGridField and test it with two case:

    First case : Cell Formatter returning a string "1.5"

    ListGridField quantityField = new ListGridField("quantity","Qty");
    quantityField.setWidth(48);
    quantityField.setCellFormatter(new CellFormatter() {

    @Override
    public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
    return "1.5";
    }
    });
    In grid, it shows formatted "Qty" - "1.5"
    But has problem with export type - "XLS (Excel97)" and "XLSX (Excel2007/OOXML)"
    with "csv" , it is working fine.

    Second case : cnage the Cell Formatter and return a string "w1.5"

    ListGridField quantityField = new ListGridField("quantity","Qty");
    quantityField.setWidth(48);
    quantityField.setCellFormatter(new CellFormatter() {

    @Override
    public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
    return "w1.5";
    }
    });

    Now, it shows formatted "Qty" - "w1.5" in grid, and export type - "csv", "xls", "xlsx" as well.

    Formatting is different for grid and export if the formatted string only contains number .

    Could you please try to reproduce it? and provide a fix - if it is reproducible.

    Thanks in advance for your support.

    Regards,

    Sonia FormattedExportSample.java

    Leave a comment:

Working...
X