1. #91
    Sencha Premium Member
    Join Date
    May 2011
    Location
    Arlington, TX
    Posts
    16
    Vote Rating
    0
    TexasSteve99 is on a distinguished road

      0  

    Default


    Quote Originally Posted by radtad View Post
    Looks like it breaks on xtype: 'actioncolumn'.

    Code:
    Error: Cannot read property 'disabled' of undefined
    I think some logic to skip this column needs to be added since there is no reason to print it that I can see. Changes in red below fixes the problem.

    Code:
                // remove columns that do not contain dataIndex
                // or dataIndex is empty.
                // for example: columns filter or columns button
                var clearColumns = [];
                Ext.each(
                    columns,
                    function (column) {
                        if ( column ) {
                            if ( !Ext.isEmpty(column.dataIndex) &&
                                 !column.hidden                 &&
                                 !isGrouped && 
                                 column.xtype !== 'actioncolumn')
                            {
                                clearColumns.push(column);
                            } else if ( column.xtype === 'rownumberer'){
                                if (!column.text) column.text = 'Row';
                                clearColumns.push(column);
                            } else if ( column.xtype === 'templatecolumn'){
                                clearColumns.push(column);
                            } else if ( isGrouped && 
                                          column.dataIndex !== groupField && 
                                          column.xtype !== 'actioncolumn') 
                            {
                                clearColumns.push(column);
                            }
                        }
                    }
                );
                columns = clearColumns;
    Thanks for contributing! I have entered your fix and submitted a Pull request to Loaine. The fix should be on GitHub within 24 hours.

    Steve

  2. #92
    Touch Premium Member
    Join Date
    Dec 2011
    Posts
    25
    Vote Rating
    0
    smstid is on a distinguished road

      0  

    Default


    Hi thanks for the nice updated version

    Is there a way to extend your nice plugin with rowbody

    I have been using Eds original plugin before that I modified to print the row body, but have now switch to using yours and has been playing with the code without success for printing the row body.

    Regards Max

  3. #93
    Sencha Premium Member
    Join Date
    May 2011
    Location
    Arlington, TX
    Posts
    16
    Vote Rating
    0
    TexasSteve99 is on a distinguished road

      0  

    Default


    Quote Originally Posted by smstid View Post
    Hi thanks for the nice updated version

    Is there a way to extend your nice plugin with rowbody

    I have been using Eds original plugin before that I modified to print the row body, but have now switch to using yours and has been playing with the code without success for printing the row body.

    Regards Max
    I will get that working when I start working on the tree grid support. I will probably start working on it late next week.

    Steve

  4. #94
    Touch Premium Member
    Join Date
    Dec 2011
    Posts
    25
    Vote Rating
    0
    smstid is on a distinguished road

      0  

    Default


    Fantastic, big thanks
    If there is anything I can do to help you out I am happy to do that

    Best Regards Max

  5. #95
    Sencha User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    126
    Vote Rating
    1
    filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute

      0  

    Default


    I'm tring to integrate gridprinter plugin in my project. I get an error: 'record is undefined' on line 72766 of ext-all-debug where ext call method getGroups:

    Code:
    getGroups: function(requestGroupString) {var records = this.data.items,
    length = records.length,  // <-- error line
    groups = [],
    pointers = {},
    record,
    groupStr,
    group,
    i;
    for (i = 0; i < length; i++) {
    record = records[i];
    groupStr = this.getGroupString(record);
    group = pointers[groupStr];
    if (group === undefined) {
    group = {
    name: groupStr,
    children: []
    };
    groups.push(group);
    pointers[groupStr] = group;
    }
    group.children.push(record);
    }
    return requestGroupString ? pointers[requestGroupString] : groups;
    }
    I'm using Ext 4.2.1.883

  6. #96
    Sencha User
    Join Date
    Jan 2008
    Location
    Los Angeles
    Posts
    149
    Vote Rating
    1
    radtad is on a distinguished road

      0  

    Default


    Quote Originally Posted by filippo.ferrari View Post
    I'm tring to integrate gridprinter plugin in my project. I get an error: 'record is undefined' on line 72766 of ext-all-debug where ext call method getGroups:

    I'm using Ext 4.2.1.883
    Posting ExtJS code isn't helping anyone debug your code. You will need to post your code in order for anyone to help you.

  7. #97
    Sencha User
    Join Date
    Nov 2013
    Posts
    1
    Vote Rating
    0
    diegotainha is on a distinguished road

      0  

    Default Duplica a impressão.

    Duplica a impressão.


    Olá Loiane, estou com um problema na minha impressão. A grid é impressa duas vezes em uma mesma página de impressão, uma grid em seguida da outra. Já ocorreu algo assim? Sabe o motivo?

  8. #98
    Ext JS Premium Member Matt Bittner's Avatar
    Join Date
    Aug 2008
    Posts
    106
    Vote Rating
    1
    Matt Bittner is on a distinguished road

      0  

    Default


    Any ideas, off the top of your heads, why I would receive a "getFields" is not a function error from within ux.grid.Printer, at line 543? I checked the regModel and it appears to be the same as the example.

    Here's part of the code:

    Code:
    Ext.regModel( 'reportModel', {
      extend: 'Ext.data.Model',
      fields: [
        {name: 'plan'},
        {name: 'anniversary'},
        {name: 'rec_id'}
      ]
    });
    
    var reporStore = Ext.create( 'Ext.data.JsonStore', {
      autoLoad: true,
      model: 'reportModel',
      proxy: {
        type: 'ajax',
        url: 'anniversary.sql',
        reader: {
          idProperty: 'rec_id',
          root: 'results',
          type: 'json'
        }
      }
    });
    
    var reportGrid = Ext.create( 'Ext.ux.LiveSearchGridPanel', {
      columns: [],
      hidden: false,
      hideCollapseTool: true,
      id: 'reportGrid',
      afterrender: function( self, store_record, html_element, node_index, event ){
        this.getTopToolbar().add( {xtype: 'tbfill'} );
        this.getTopToolbar().add({
          text: 'Print',
          iconCls: 'icon-print',
          handler: function(){
            Ext.ux.grid.Printer.printAutomatically = false;
            Ext.ux.grid.Printer.print ( Ext.getCmp( 'reportGrid' ) );
          }
        });
      },
      store: reportStore
    });
    Matt Bittner

  9. #99
    Sencha Premium Member
    Join Date
    May 2011
    Location
    Arlington, TX
    Posts
    16
    Vote Rating
    0
    TexasSteve99 is on a distinguished road

      0  

    Default


    This is probably caused because the Grid Printer gets an undefined when calling getModel(). Since Ext.regModel is deprecated since 4.0.0, try changing it to Ext.define. If that doesn't work, let us know what version of ExtJS your using.

    Steve

  10. #100
    Ext JS Premium Member Matt Bittner's Avatar
    Join Date
    Aug 2008
    Posts
    106
    Vote Rating
    1
    Matt Bittner is on a distinguished road

      0  

    Default


    Changed Ext.regModel to Ext.define and still receiving the same error. I'm currently on 4.0.7 but about to upgrade to 4.2.1 hopefully in the very near future.
    Matt Bittner