1. #101
    Sencha Premium Member austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    103
    Vote Rating
    1
    austin1030 is on a distinguished road

      0  

    Default


    Hi

    I have updated Printer.js with the latest one with hope GroupSummary is working. But, for some reason, it does not work. I wonder why. BTW, I'm using Ext 4.2.x.

    Is there a tip or step am I missing?

    Austin

  2. #102
    Sencha Premium Member TexasSteve99's Avatar
    Join Date
    May 2011
    Location
    Arlington, TX
    Posts
    21
    Vote Rating
    1
    TexasSteve99 is on a distinguished road

      0  

    Default Printing Summaries

    Printing Summaries


    I re-downloaded the version of sourceforge recently. It appears that printing summaries is broken. Its also not printing my tree grids properly. I will fix it but its going to take some time. In the meantime, try this version that I use in my enterprise apps.

    Thanks,

    Steve Ervin
    Attached Files

  3. #103
    Sencha Premium Member austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    103
    Vote Rating
    1
    austin1030 is on a distinguished road

      0  

    Default


    Thanks TexasSteve99

    I believe below code is what causing...end of function, you are returning "undefined".
    Code:
    getFeature : function( grid, featureFType) {
                var view = grid.getView();
                var features = view.features;
                if (features)
                    for (var i = 0; i <features.length; i++)
                    {
                        if (featureFType == 'grouping')
                            if (features[i].ftype == 'grouping' || features[i].ftype == 'groupingsummary')
                                return features[i];
                        if (featureFType == 'groupingsummary')
                            if (features[i].ftype == 'groupingsummary')
                                return features[i];                        
                        if (featureFType == 'summary')
                            if (features[i].ftype == 'summary')
                                return features[i];                        
                    }
                return undefined;  //WHY????
            },
    EDIT: on the other hand, I may mistaken above code for bug...it may not....then, I don't know why.

    EDIT 2: Looking into above code, Ext 4.2.x does not have ftype in feature.

  4. #104
    Sencha Premium Member austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    103
    Vote Rating
    1
    austin1030 is on a distinguished road

      0  

    Default


    TexasSteve99

    Just let you know that I downloaded your file but no luck.

  5. #105
    Sencha Premium Member austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    103
    Vote Rating
    1
    austin1030 is on a distinguished road

      0  

    Default


    I found out that if I just do this...

    Code:
    return features[0];
    Rest of parts is working.

    Austin

  6. #106
    Sencha User BillySao's Avatar
    Join Date
    Jan 2013
    Posts
    29
    Vote Rating
    1
    BillySao is on a distinguished road

      0  

    Default Why is not displayed?

    Why is not displayed?


    Hi,
    Why I can not see the data grouped when do I configure it this way in the gridpanel?

    Code:
     features: [
                            {
                                ftype: 'grouping',
                                groupHeaderTpl: [
                                    '{[values.rows[0].data["name"]]}'
                                ]
                            }
                        ]
    With the above code I would like to know if there is any way that I can display the data grouped as this is not seen. Thank you very much.
    BillySao
    Developer and Analyst

  7. #107
    Sencha Premium Member TexasSteve99's Avatar
    Join Date
    May 2011
    Location
    Arlington, TX
    Posts
    21
    Vote Rating
    1
    TexasSteve99 is on a distinguished road

      0  

    Default Grid Printer Plugin

    Grid Printer Plugin


    All,

    I have fixed the getFeature() method. I have also fixed the plugin to work on ExtJS 5.0.1. It was not working on ExtJS 5 previously because the output of Ext.data.store.getGroups() has changed. Previously it emitted an array of group objects. Under ExtJS 5, it emits an Ext.util.GroupCollection object. Ext.util.GroupCollection is a private class. The documentation has not been updated to reflect that it no longer emits an array. I have opened a ticket with Sencha on the misleading documentation. The new code has been posted to https://github.com/loiane/extjs4-ux-gridprinter.

    Enjoy,

    Steve Ervin

  8. #108
    Sencha Premium Member TexasSteve99's Avatar
    Join Date
    May 2011
    Location
    Arlington, TX
    Posts
    21
    Vote Rating
    1
    TexasSteve99 is on a distinguished road

      0  

    Default groupHeaderTpl

    groupHeaderTpl


    Quote Originally Posted by BillySao View Post
    Hi,
    Why I can not see the data grouped when do I configure it this way in the gridpanel?

    Code:
     features: [
                            {
                                ftype: 'grouping',
                                groupHeaderTpl: [
                                    '{[values.rows[0].data["name"]]}'
                                ]
                            }
                        ]
    With the above code I would like to know if there is any way that I can display the data grouped as this is not seen. Thank you very much.
    Download the new Printer.js I just posted to github.com and change rows to children. Rows is deprecated and not supported by the Grid Printer Plugin. If that doesn't work, try values.children[0].get("name").

    Steve Ervin

  9. #109
    Sencha User BillySao's Avatar
    Join Date
    Jan 2013
    Posts
    29
    Vote Rating
    1
    BillySao is on a distinguished road

      0  

    Default


    Quote Originally Posted by TexasSteve99 View Post
    Download the new Printer.js I just posted to github.com and change rows to children. Rows is deprecated and not supported by the Grid Printer Plugin. If that doesn't work, try values.children[0].get("name").

    Steve Ervin
    Thank you very much, works perfectly, excellent support.
    BillySao
    Developer and Analyst

  10. #110
    Sencha Premium Member austin1030's Avatar
    Join Date
    Feb 2008
    Location
    Hanover, Maryland
    Posts
    103
    Vote Rating
    1
    austin1030 is on a distinguished road

      0  

    Default


    Quote Originally Posted by TexasSteve99 View Post
    I have fixed the getFeature() method. I have also fixed the plugin to work on ExtJS 5.0.1. It was not working on ExtJS 5 previously because the output of Ext.data.store.getGroups() has changed. Previously it emitted an array of group objects. Under ExtJS 5, it emits an Ext.util.GroupCollection object. Ext.util.GroupCollection is a private class. The documentation has not been updated to reflect that it no longer emits an array. I have opened a ticket with Sencha on the misleading documentation. The new code has been posted to https://github.com/loiane/extjs4-ux-gridprinter.
    Thank you so much!