1. #11
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    479
    Vote Rating
    5
    cmendez21 is on a distinguished road

      0  

    Default


    Hi beebop

    First of all something i have done on the reports its to Order in the store the fields exactly as the column headers so the store's field index can match the index of the column header

    you may use firebug to check the behavior of the printer code also on lines 158 to 241

    Check this property also usenameindex (not included on the manual)

    About the domPDF error check the dompdf page and forum.

    In my experience i've some errors too when the records are too much and if you are using the custom tpl that came with xprinter maybe it generates a table so big it passes the page height so this issue generates an error (domPDF error)

    on this case what you can do is:

    1.- Adjust the paging of the grid so each time you create a report it could match the eheigh of the page

    2.- change or adjust to your needs the TPL object on line 99 on the file extjs_printergrid_0.0.1.js so instead of generating a TABLE element it could create a DIV element

    Hope this works

    PD. if it doesn't work please give me a link so i can check it out and see what the problem is
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  2. #12
    Ext User
    Join Date
    Oct 2008
    Location
    France
    Posts
    17
    Vote Rating
    0
    beebop is on a distinguished road

      0  

    Default


    I realized my data were in the same order as my store, while it should be as my grid.
    Resolved with usenameindex: true.
    Should'nt it be grid's order by default ?
    And it would not be as disturbing if columns header had the same order as the data (it seems columns header don't take care of usenameindex value).

  3. #13
    Ext User
    Join Date
    Oct 2008
    Location
    France
    Posts
    17
    Vote Rating
    0
    beebop is on a distinguished road

      0  

    Default


    Now printing works good. PDF export still does not works, and it will be more complicated, because I have to print at least 100 or 150 items, but PDF export is not indispensable for me, unlike printing, so it is not disturbing.

  4. #14
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    479
    Vote Rating
    5
    cmendez21 is on a distinguished road

      0  

    Default


    Well you right, gonna check it later

    But for the app i'm making was easier for me to get the header as reference and only the name so i could link it by index to the store fields or data (in the case of grids),also consider the Xtprinter needs a lot work yet its the first version
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  5. #15
    Ext User
    Join Date
    Oct 2008
    Location
    France
    Posts
    17
    Vote Rating
    0
    beebop is on a distinguished road

      0  

    Default


    No problem. It works good enough for me now.
    I have just one last problem, when printing. I have strange characters in my headers (using

  6. #16
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    479
    Vote Rating
    5
    cmendez21 is on a distinguished road

      0  

    Default


    inside xtprinter file add a custom function to replace those chars maybe with acute; notations , on lines 219 and 221

    replace :

    219:
    tdvalues+= testrender.call(this,this.grid.store.getAt(i).data[this.grid.store.getAt(i).fields.items[jval].name])
    221:
    tdvalues+= testrender.call(this,this.grid.store.getAt(i).data[this.grid.getColumnModel().config[numcolref].dataIndex])

    FOr
    219:
    tdvalues+=youfunction(testrender.call(this,this.grid.store.getAt(i).data[this.grid.store.getAt(i).fields.items[jval].name]))
    221
    tdvalues+=youfunction( testrender.call(this,this.grid.store.getAt(i).data[this.grid.getColumnModel().config[numcolref].dataIndex]))
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  7. #17
    Sencha User calavera's Avatar
    Join Date
    Jan 2008
    Posts
    119
    Vote Rating
    0
    calavera is on a distinguished road

      0  

    Default


    This is a very nice plugin. Can anyone tell me, please how can I show all the records on the printing page ? I have pagination on my grid and at print I only get a few results that were on my 1st page of the grid ..Maybe a solution for this ? I tried the pagination over the printing page but no success. How should I handle multiple pages of records at print ?

    Thanks.

  8. #18
    Sencha User TopKatz's Avatar
    Join Date
    Mar 2007
    Posts
    337
    Vote Rating
    1
    TopKatz is on a distinguished road

      0  

    Default


    Quote Originally Posted by calavera View Post
    This is a very nice plugin. Can anyone tell me, please how can I show all the records on the printing page ? I have pagination on my grid and at print I only get a few results that were on my 1st page of the grid ..Maybe a solution for this ? I tried the pagination over the printing page but no success. How should I handle multiple pages of records at print ?

    Thanks.
    Its taking the data from the store. If you want more then you will have to bring back more. Paging works by setting a limit on what is returned. You cant print what you dont have. All you have to do is load the store with all the results when the 'print' is requested by the user.

  9. #19
    Sencha User calavera's Avatar
    Join Date
    Jan 2008
    Posts
    119
    Vote Rating
    0
    calavera is on a distinguished road

      0  

    Default


    Quote Originally Posted by TopKatz View Post
    Its taking the data from the store. If you want more then you will have to bring back more. Paging works by setting a limit on what is returned. You cant print what you dont have. All you have to do is load the store with all the results when the 'print' is requested by the user.
    Thank you for your response. That seems perfectly logic. Unfortunately, I'm not that experienced with Ext as I'm just beginning to get the feel of it. I don't know how to do this, how to load the store with different results limitations when the print is actually requested. I could use an example, but only if it's not too much. Otherwise, more details on this operation would be appreciated.

    Thank you.

  10. #20
    Sencha User TopKatz's Avatar
    Join Date
    Mar 2007
    Posts
    337
    Vote Rating
    1
    TopKatz is on a distinguished road

      0  

    Default


    Quote Originally Posted by calavera View Post
    Thank you for your response. That seems perfectly logic. Unfortunately, I'm not that experienced with Ext as I'm just beginning to get the feel of it. I don't know how to do this, how to load the store with different results limitations when the print is actually requested. I could use an example, but only if it's not too much. Otherwise, more details on this operation would be appreciated.

    Thank you.
    You just need to do your store.load() with out the start and limit paramaters