1 Reply Latest reply on Mar 2, 2011 5:42 AM by Jerry62712

    How do I get Grid to print everything?

    Jerry62712 Level 1

      I'm trying two approaches to get a data grid to print.  The one attempt for this discussion is using states and a component defined in mxml.

       

      1) I have a "print" state that hides stuff and reveals a PrintAdvancedDataGrid when a button is clicked.

      2) The PADG is datasourced to the input data.  It can be seen on the screen.

      3) this code is executed:

                  private function printCaseNotesComponent():void
                  {
                      var printJob:FlexPrintJob = new FlexPrintJob();
                      if (printJob.start())
                      {
                          printJob.addObject(myPrintAdvancedDataGrid);
                          while (myPrintAdvancedDataGrid.validNextPage)
                          {
                              myPrintAdvancedDataGrid.nextPage();
                              printJob.addObject(myPrintAdvancedDataGrid);
                          }

                          printJob.send();
                      }
                  }

       

      The first five records are printed and the sixth one is not.  I assume that if there were 100 records that it wouldn't page and print them either.

       

      I can see 4 complete records in the grid and part of the fifth one.  It looks to me like the "nextPage()" isn't doing that.

       

      TIA,

      Jerry