I have.  The grid is a search result.  So, if I query for something
that takes up more than two pages then the result is the footer gets
printer on the second page, but a third page prints out with just the
footer.

I've also tried it with just 10 rows of data....the second page in
that case will just be the footer.

--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Maybe a bug on a boundary condition.  Try changing the size of the PDG
> and see if that makes a difference.
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of hammer995
> Sent: Monday, October 01, 2007 10:56 AM
> To: [email protected]
> Subject: [flexcoders] Re: dataGrid Printing: validNexPage always TRUE
> 
>  
> 
> I should clarify that I do get a false from validNextPage but it seems
> to be after all the data has been printed. I then get an extra page
> with just the footer.
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , "hammer995" <hammer995@> wrote:
> >
> > So I followed the example from the docs to print a datagrid. For some
> > reason I always get validNextPage to be true even when there is not
> > enough data to fill a page. 
> > 
> > The example works fine but I cannot get it to work with my
> application.
> > 
> > Here is the code:
> > private function printExecution():void {
> > var printJob:FlexPrintJob = new FlexPrintJob;
> > 
> > if ( printJob.start() ) {
> > var thePrintView:FormPrintView = new FormPrintView();
> > thePrintView.visible = false;
> > thePrintView.includeInLayout = false;
> > Application.application.addChild(thePrintView);
> > 
> > thePrintView.width = printJob.pageWidth;
> > thePrintView.height = printJob.pageHeight;
> > 
> > thePrintView.acct = acctArray[accts.selectedIndex]; 
> > 
> > thePrintView.fromDate = df.format(fromDate.selectedDate);
> > thePrintView.toDate = df.format(toDate.selectedDate);
> > thePrintView.totalTrades = numFmt.format(totalTrades);
> > thePrintView.totalQty = numFmt.format(totalQty);
> > thePrintView.totalComm = total.format(totalComm);
> > thePrintView.dg_printDG.dataProvider =
> > dg_report.dataProvider; 
> > 
> > thePrintView.showPage("single"); 
> > thePrintView.footer.includeInLayout = true;
> > thePrintView.footer.visible = true; 
> > 
> > trace("VALIDNEXTPAGE1 = " +
> > thePrintView.dg_printDG.validNextPage)
> > if (!thePrintView.dg_printDG.validNextPage) { 
> 
> > printJob.addObject(thePrintView);
> > } else {
> > thePrintView.showPage("first");
> > printJob.addObject(thePrintView);
> > thePrintView.pageNumber++;
> > 
> > while(true) {
> > thePrintView.dg_printDG.nextPage(); 
> > thePrintView.showPage("last");
> > trace("VALIDNEXTPAGE2 = " +
> > thePrintView.dg_printDG.validNextPage)
> > if (!thePrintView.dg_printDG.validNextPage) { 
> > 
> > printJob.addObject(thePrintView);
> > break;
> > } else {
> > thePrintView.showPage("middle");
> > printJob.addObject(thePrintView);
> > thePrintView.pageNumber++;
> > trace("PAGE = " + thePrintView.pageNumber);
> > }
> > }
> > }
> > Application.application.removeChild(thePrintView);
> > }
> > printJob.send();
> > }
> > 
> > 
> > Any help would be appreciated...I've been banging my head for a few
> > days now.
> > 
> > thanks!
> >
>


Reply via email to