1. #21
    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
    You just need to do your store.load() with out the start and limit paramaters
    yes, but how do i do that only when i want the print? because i need pagination for my grid. i just dont need it with the print popup...

  2. #22
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    just supress the toolbar from the popup on the printer creation code anyway the toolbar does not appear on the print.

    and as TopKatz says its taking the records from the store if you want custom data you could use the other method (custom store) to print your records or if you dont want the paging toolbar then use the property useIt: false, Check the manual to see what all the options and properties can do

    I know its a bit tricky but you need to understand a little bit more of Extjs , also for to check the behavior you could use firebug and set breakpoints to see whats going on with the xtprinter

    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  3. #23
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Arrow


    Heres a Tip

    EXAMPLE

    if you have 1000 records in your table and your paging in your grid its about 100 records per page use the custom printing method instead of the GRID printing method

    now the important part its that you have to create a php function that allows you to retrieve all the records in one request

    An important part now its to determine how many records fit on a single page

    On the server side you have to set the paging and for each page (a loop to create all the pages)

    you specify the JSON response

    {success:true,
    records:[{"page":"1",
    "datapage":[
    {"id":"1","name":"richard miller"},
    {"id":"2","name":"richard miller"},
    AND so on
    ]
    }

    now on the template

    <tpl for=".">
    your page header...... page#{page}
    <tpl for="datapage">
    the data for your page
    </tpl>
    </tpl>


    And that will be all

    Obviously you will have to make some changes to the tpl base for printing on the JS file for the xtprinter

    Or you could add a new method that will handle this option
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  4. #24
    Ext User
    Join Date
    Sep 2008
    Posts
    6
    Vote Rating
    0
    snoir is on a distinguished road

      0  

    Default


    I used the summary plugins,and I want to print summary result,how can I do?

  5. #25
    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 cmendez21 View Post
    just supress the toolbar from the popup on the printer creation code anyway the toolbar does not appear on the print.

    and as TopKatz says its taking the records from the store if you want custom data you could use the other method (custom store) to print your records or if you dont want the paging toolbar then use the property useIt: false, Check the manual to see what all the options and properties can do

    I know its a bit tricky but you need to understand a little bit more of Extjs , also for to check the behavior you could use firebug and set breakpoints to see whats going on with the xtprinter

    Thanks for the tip. It works perfect now. I want to ask you a question: Is it possible to modify the rows generator that fills up the print page with records from datastore so that after every 25 records to display a text like "New page - 30 Dec 2008" ? This way, I can't loose my reports because I would have the date ar the end of every printed page. So, can we mark every end of page ? Or even better, every start of the page ? I would be glad if I could even bring up the printing header with the logo and date on every 20 records. Let me know.

    Thank you very much!

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

      0  

    Default


    Quote Originally Posted by snoir View Post
    I used the summary plugins,and I want to print summary result,how can I do?
    you need to modify the XTprinter file its not supported yet
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  7. #27
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    Quote Originally Posted by calavera View Post
    Thanks for the tip. It works perfect now. I want to ask you a question: Is it possible to modify the rows generator that fills up the print page with records from datastore so that after every 25 records to display a text like "New page - 30 Dec 2008" ? This way, I can't loose my reports because I would have the date ar the end of every printed page. So, can we mark every end of page ? Or even better, every start of the page ? I would be glad if I could even bring up the printing header with the logo and date on every 20 records. Let me know.

    Thank you very much!
    mm you will have to modify the (base) xTemplate inside the Xtprinter file so you can adjust for you needs unfortunately haven't tried to keep count of records inside the XTemplate
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

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

      0  

    Default Results problem

    Results problem


    I have a problem: When I click the print button, the pop-up appears but it's empty, no results. I have checked the firebug console and found out the the pop-up comes in before the json request is finished. So if I click refresh after the query is finished, my results would appear...Is there any way to launch the pop-up after the query is complete ? So that I would get the results from the first attempt, not to wait for it and press refresh ? Also, I noticed that the printing doesn't support very large sets of data...can this be fixed ? Or it's the POST/GET restriction from PHP that's limiting ?

    Thank you.

  9. #29
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    Quote Originally Posted by calavera View Post
    I have a problem: When I click the print button, the pop-up appears but it's empty, no results. I have checked the firebug console and found out the the pop-up comes in before the json request is finished. So if I click refresh after the query is finished, my results would appear...Is there any way to launch the pop-up after the query is complete ? So that I would get the results from the first attempt, not to wait for it and press refresh ? Also, I noticed that the printing doesn't support very large sets of data...can this be fixed ? Or it's the POST/GET restriction from PHP that's limiting ?
    Thank you.
    1.- You could load the store before creating the printer obejct (check the sample how its working) and on the event on load create the printer

    2.- Large data sets depends upon the Server side response time so thats why you could use paging , the largest dataset for a I've used its about 300 records (10 columns) (serverside)

    indeed i think theres a lot more work to be done on the printer , gonna check it as soon as i can
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  10. #30
    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 cmendez21 View Post
    1.- You could load the store before creating the printer obejct (check the sample how its working) and on the event on load create the printer

    2.- Large data sets depends upon the Server side response time so thats why you could use paging , the largest dataset for a I've used its about 300 records (10 columns) (serverside)

    indeed i think theres a lot more work to be done on the printer , gonna check it as soon as i can
    We would surely appreciate more advanced work on this project.

    Thank you for all! I will try your suggetions.