1 Reply Latest reply on May 26, 2008 7:54 AM by Mitek17

    Incorrect output in PrintDataGrids

      Hello Flex Community,

      I have an exciting problem and hope anybody can help me. My application does the following:

      1. I have a panel with two DataGrids one below the other, which are filled with more than 100 rows.
      2. I want to print these DataGrids. I tried to do this - as decribed in the LiveDocs - with PrintDataGRids.
      3. I want that the first DataGrid is printed completely on multiple pages and finally the second DataGrid.

      My problem is that each printed page visualizes both PrintDataGrids with 10 items in each case. And that is done for the next 10 pages.

      Question: How can I enforce that Flex prints at first the one DataGrid completely on multiple pages and then the second one???

      Gruß Greenhorn
        • 1. Re: Incorrect output in PrintDataGrids
          This is a major feature of Flex - inability to print.

          You've bumped into the problem that assigning 100% height to the PDG gets you into the described case.
          FlashPLayer uses 2 passes to layout the elements. So, at the first pass you've got 2 PDGs with 100% height and this thing drives FP nuts.

          As a solution you have to manually calculate available height and set PDG.height to that value, one PDG at a time.

          In my project I am using N-pass technique to layout all elements correctly, but still I can't overcome all the problems with mighty "Flex Printing Engine"

          PS I am inclined to think that server-side printing solution is the way to go.(like PDFLib)