0 Replies Latest reply on Jan 13, 2010 4:06 AM by m-r-m-2-0-9-0

    FlexReport: Printview does not show PrintADG rows

    m-r-m-2-0-9-0 Level 1

      Hi all,

      I am using FlexReport such that I send an AdvancedDataGrid columngroups and its dataProvider (ArrayCollection) as parameters via the dataProvider of the Report. My Preview.mxml extends the SuperPanel ( http://www.wietseveenstra.nl/blog/2007/04/flex-superpanel-v15/ ).

       

      I test the whole functionality in a separate test mx:Application, whose init() method creates a hardcoded ADG and a PreviewSuperPanel that is added to the application child list. Everything is working well.

       

      var da : ArrayCollection = new ArrayCollection([...]);
      var gcols: Array = new Array();
      var groupCol1 : Array = new Array();
                       
      var groupHeader : AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
      groupHeader.headerText = "";
                                                 
      var newADGColumn : AdvancedDataGridColumn = new AdvancedDataGridColumn();
      newADGColumn.dataField = "d";
      newADGColumn.headerText = "";
      newADGColumn.sortable = false;
      groupHeader.children.push(newADGColumn);
      gcols.push(groupHeader);
      // etc..
      var source:DemoReportDP = new DemoReportDP(text, da, gcols);
      var report:DemoReportADG = new DemoReportADG();
      doc = new Document(report, source, PaperFormat.A4);
      doc.pdfScript = "http://www.kemelyon.com/flexreport/create.php";
                         
      doc.pdfEnabled = true;
      var printPreview : PreviewSuperPanel = new PreviewSuperPanel();
      printPreview.title = "Report Print View";
      printPreview.width = 800;
      printPreview.height = 700;
      printPreview.x = this.createdWindows * 20;
      printPreview.y = this.createdWindows * 20;
      printPreview.showControls = true;
      addChild(printPreview);
      printPreview.doc = doc;
      
      

       

      In my real application, I have a SuperPanel with a menu to update, saving, retrieving, printing etc Reports with simple logo, header and Table (which I convert to ADG). From this menu, when I call Print, it is supposed to create a dataProvider with the logo, title, array collection and ADG columngroups. Finally, it should show another child SuperPanel for my Preview object. The header containing the logo and the title is shown, the matrix with its headers, columns and rows are also correctly shown. The problem is that the data in the rows is not shown (no numbers and no text in the matrix).

      In org.print.ReportAdvancedDataGrid.mxml, the init() method is:

       

      this.groupedColumns = (this.parent.parent as Report).dataProvider.gcols;
      if(this.width > this.parent.parent.width) {
           this.width = this.parent.parent.width - 100;
      }
      this.validateNow();
      

       

      which is exactly the same as in the Test version above.

       

      I would be very thankful if someone helps me around.