Thankfully, the basic printing functionality of Flex was all I needed
to print out the very basic looking reports I need for my application.
However, another requirement is adding Print Preview functionality. So
far in my experimentation I've managed to display what should be on
the report by opening up at least the first page in a window as seen
in this code:

private function printPreview():void
{
 var thePrintView:FormPrintView = new FormPrintView();
 var preWindow:Window = new Window();
 preWindow.title = "Print Preview";
 preWindow.width = 800;
 preWindow.height = 600;
 preWindow.addChild(thePrintView);
 thePrintView.width = preWindow.width;
 thePrintView.height = preWindow.height;
 thePrintView.prodTotal = prodTotal;
 thePrintView.myDataGrid.dataProvider = myDataGrid.dataProvider;
 preWindow.open();
}

Very basic but is really only good for showing the first page though I
believe I can allow for the displaying of multiple pages if I can
figure that out. Then comes the task of getting rid of the lines in
the print data grid and sizing the window properly.

Now, I am aware of the marvelous looking FlexReport at
http://www.kemelyon.com/bts/, however I am at a loss as how to
"install" it so to speak (Meaning I have no idea what files and
components I need to copy over in order to use it).

Any hints or points in the right direction are very much welcome.
Thanks in advance,

Brian Ross Edwards
Tech-Connect LLC

Reply via email to