frankfenghua / flexreport

Automatically exported from code.google.com/p/flexreport
0 stars 0 forks source link

I get a Black Box in the printed paper, #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I created an AIR app with a TileWindows thats shows a preview of a Report
2. The app & the TileWindows show well the Preview
3. i saw everything ok in the preview but i get a Black Box in the printed
paper.

What is the expected output? What do you see instead?
I expected to get a printed as i see in the preview, but i get a Black Box
in the printed paper.

What version of the product are you using? 
I dont know the FlexReport version, the last update issue is Sep 04, 2009 

On what operating system?
Windows (vista/XP)

Please provide any additional information below.
I found a solution, but i dont know if this broke something else. 

in class org.doc.Document i found this:

Application.application.addChild(template)... why?

public function doPrint():void
{
  var printJob:FlexPrintJob = new FlexPrintJob();
  printJob.printAsBitmap = false;

  if (printJob.start()) {
    setUpTemplate();
    //ERROR? Why? Application.application.addChild(template);
    _template.validateNow();
    _template.reset();

   do {
      if (_pageRangeManager.canPrint(_template.pageNumber))
        printJob.addObject(_template as
UIComponent,FlexPrintJobScaleType.FILL_PAGE);
    } while(_template.nextPage());

    //ERROR? Why? Application.application.removeChild(template);
    printJob.send();
  }                         
}

The library is great, it's save us a lot of work!!!!!!!! Thanks!

Original issue reported on code.google.com by elda...@gmail.com on 17 Sep 2009 at 5:40

GoogleCodeExporter commented 8 years ago
Hi

I'm having the same problem and here is what i've found so far. The black box 
appear 
only when the report is in a titleWindow. If i remove the addChild method it 
works 
but it broke the multi-page support for the PrintTextArea since my report no 
longer 
render correctly. The workaround that i have right now is to show the report 
using a 
viewstack in my main app instead of a pop-up and titleWindow.

Original comment by mjalbert...@gmail.com on 12 Apr 2010 at 3:37

GoogleCodeExporter commented 8 years ago
I come to the same problem.
when I remove 

//ERROR? Why? Application.application.addChild(template);

the printed page has no words! 

please give me some advise.

Original comment by lixueli...@126.com on 3 Nov 2011 at 12:15