0 Replies Latest reply on Aug 8, 2007 11:16 AM by shawnyale

    Adding Child to Application

      In this video:

      Which deals with printing, the dude said that you have to add a child to the application like so:

      var printJob:FlexPrintJob = new FlexPrintJob();
      var printView:PrintAllMeetings = new PrintAllMeetings();

      // Start the print job.
      if (printJob.start() != true) return;
      // Add the PrintAllMeetings object to the application

      // Set the data provider and height / width
      printView.PrintMeetings.dataProvider = lstData.dataProvider;
      printView.width = printJob.pageWidth;
      printView.height = printJob.pageHeight;

      I've done everything he said to do, but when I try to print my list, I am only getting the top 2 rows per page. I think the addChild method is adding to the component instead of the application. Is this correct? Does it matter? After the top 2 lines of data, the rest of the printed page seems to be "masked" and Im wondering if adding a child to the application from a component differs from adding a child within the main application file itself.

      Any help would be greatly appreciated. Thank you.