title: Flex 4 Printing Error with dynamic components
body: <p>I have a set of components that are added to my Flex 4 stage dynamically.</p>
  
  <p>Problem 1:
  How do I address these objects when adding them to print.I cant generate objects on the fly and append them because then the print manager does not wait for the dynamic data to populate.</p>
  
  <p>I currently use the following code to address items dynamically which fails:</p>
  
  <pre><code>public function PrintDashPreview():void{
      var ItemsDrawn:int = 0;
      var printJob:FlexPrintJob = new FlexPrintJob();
      if(printJob.start()){
          for each (var item:Object in GetDashBoardPreviewItems.lastResult.DashboardItem)
          {
              ItemsDrawn ++
              this.addElement(dashPreview["flexShape" + TheID]);
              printJob.addObject(dashPreview["flexShape" + TheID]);
              this.removeElement(dashPreview["flexShape" + TheID]);
  
          }
          printJob.send()
  
      Alert.show('Sent: ' + ItemsDrawn + ' items to page for printing.','Print Progress Debug');
      }
  }
  </code></pre>
  
  <p>How can I tell flex to grab these specific items and add them to the print job.</p>
  
  <p>Problem 2: </p>
  
  <p>How do I tell flex to lay each item out one below the other 2 per page.</p>
  
  <p>Please and thank you for any help you can provide.</p>
  
  <p>Regards
  Craig Mc</p>