title: Flex - FlexPrintJob how to print a group of fields and a PrintDataGrid properly?
body: <p>I am trying to print a multiple-page FlexPrintJob, that includes on the first page, several labels, then a PrintDataGrid.   It all prints, except that the PrintDataGrid only prints using half the page on all the pages.   </p>
  
  <p>I know it has to do with the labels that I am printing on page 1, because taking them off or hiding them fixes the issue and the grid prints full page all pages.</p>
  
  <p>I have tried various containers around the grid and labels, including VBox, VGroup, Group, and specifying different combinations of height="100%" for some of the containers.</p>
  
  <p>Is it simply not possible to print a half page of variables / labels on page 1, then start the data grid on the same page (half page worth), but then have it go to full page on the following pages?</p>
  
  <p>Here is my print job code:</p>
  
  <pre><code>   var printJob:FlexPrintJob = new FlexPrintJob();
      if (printJob.start()) {
  var thePrintView:printViewEventUser = new printViewEventUser(); // Create a FormPrintView control as a child of the application.
          addElement(thePrintView);
                          thePrintView.width=printJob.pageWidth; 
                          thePrintView.height=printJob.pageHeight;
                          thePrintView.parentEncounter=parentEncounter;  //pass in my object for the labels to print
                          thePrintView._currentRec=_currentRec;  //pass in my object for the labels to print
  
                          thePrintView.myDataGrid.dataProvider = bedSearchEditList._recs;
                          thePrintView.showPage("single"); // Create a single-page image.
                          if(!thePrintView.myDataGrid.validNextPage) // If the print image's DataGrid can hold all the data provider's rows, add the page to the print job. 
                          {
                              printJob.addObject(thePrintView,FlexPrintJobScaleType.NONE);
                          }
                          else // Otherwise, the job requires multiple pages.
                          {
                              thePrintView.showPage("first"); // Create the first page and add it to the print job.
                              printJob.addObject(thePrintView);
                              thePrintView.pageNumber++;
                              while(true) //queue pages
                              {
                                  thePrintView.myDataGrid.nextPage(); // Move the next page of data to the top of the PrintDataGrid.
                                  thePrintView.showPage("last");   // Try creating a last page.
                                  if(!thePrintView.myDataGrid.validNextPage) // If the page holds the remaining data, or if the last page was completely filled by the last grid data, queue it for printing. Test if there is data for another PrintDataGrid page.
                                  {   
                                      printJob.addObject(thePrintView,FlexPrintJobScaleType.MATCH_WIDTH); // This is the last page; queue it and exit the print loop.
                                      break;
                                  }
                                  else // This is not the last page. Queue a middle page. 
                                  {
                                      thePrintView.showPage("middle");
                                      printJob.addObject(thePrintView,FlexPrintJobScaleType.MATCH_WIDTH);
                                      thePrintView.pageNumber++;
                                  }
                              }
                          }
  
                          removeElement(thePrintView);  
  
                  }
                  printJob.send(); // Send the job to the printer.
  </code></pre>
  
  <p>My print view object is basically just an  around my labels, then a PrintDataGrid. </p>