PrintDataGrid of printing only half of the page

Hello

I have a print of my report with PrintDataGrid problem. I just copied and paste the sample code from this site form, but she seems to have a problem. Printing in the book is only half and jump to another page. rank 1-6 is on the first page and the rest is on the next page that was supposed to be on a single page. I am asking your help to find ways to print correctly.

Here, I have the code:

FormSalesTransaction.mxml

<fx:Script>
          <![CDATA[
               import mx.core.*
                    
                    // Declare and initialize the variables used in the component.
                    // The application sets the actual prodTotal value.
               [Bindable]
               public var pageNumber:Number = 1;
               [Bindable]
               public var prodTotal:Number = 0;
               
               // Control the page contents by selectively hiding the header and
               // footer based on the page type.
               public function showPage(pageType:String):void 
               {
                    if(pageType == "first" || pageType == "middle") 
                    {
                         // Hide the footer.
                         footer.includeInLayout=false;
                         footer.visible = false;
                    }
                    if(pageType == "middle" || pageType == "last") 
                    {
                         // The header won't be used again; hide it.
                         header.includeInLayout=false;
                         header.visible = false;
                    }
                    if(pageType == "last") 
                    {
                         // Show the footer.
                         footer.includeInLayout=true;
                         footer.visible = true;
                    }
                    //Update the DataGrid layout to reflect the results.
                    validateNow();
               }
          ]]>
     </fx:Script>
     
     <!-- The template for the printed page, 
     with the contents for all pages. -->
     <mx:VBox width="90%" horizontalAlign="left">
          <mx:Label text="Page {pageNumber}"/>
     </mx:VBox>
     <MyComp:FormPrintHeader id="header"/>
     
     <mx:PrintDataGrid id="myDataGrid" 
                           height="100%"
                           width="100%"
                           fontSize="7" 
                           wordWrap="true" 
                           variableRowHeight="true" 
                           fontFamily="Lucida Console" >
          <!-- Specify the columns to ensure that their order is correct. -->
          <mx:columns>
               <mx:DataGridColumn headerText="Invoice" dataField="InvoiceNo" width="65"/>
               <mx:DataGridColumn headerText="Customer" dataField="CustomerName" width="100"/>
               <mx:DataGridColumn headerText="Model" dataField="ModelNo" width="70"/>
               <mx:DataGridColumn headerText="Category" dataField="CategoryCode" width="70"/>          
               <mx:DataGridColumn headerText="Price" dataField="Price" width="80"/>
               <mx:DataGridColumn headerText="Qty" dataField="Quantity" width="35"/>                    
               <mx:DataGridColumn headerText="Cash" dataField="Cash" width="80"/>
               <mx:DataGridColumn headerText="Dollar" dataField="Dollar" width="80"/>
               <mx:DataGridColumn headerText="Cr Card" dataField="CreditCard" width="80"/>
               <mx:DataGridColumn headerText="B Share" dataField="Bankshare" width="80"/>
               <mx:DataGridColumn headerText="W Tax" dataField="WTax" width="80"/>
               <mx:DataGridColumn headerText="Lay Dep" dataField="LayawayDP" width="80"/>
               <mx:DataGridColumn headerText="Lay Bal" dataField="LayawayBal" width="80"/>
               <mx:DataGridColumn headerText="Check" dataField="Check" width="80"/>
               <mx:DataGridColumn headerText="Misc" dataField="Misc" width="80"/>
               <mx:DataGridColumn headerText="Remarks" dataField="Remarks"/>
               <mx:DataGridColumn headerText="Lay Pay" dataField="LayawayPayment" width="80"/>
          </mx:columns>
     </mx:PrintDataGrid>

and the way that I call Report.mxml:

var printJob:FlexPrintJob = new FlexPrintJob();
                    
if (printJob.start()) {
        var thePrintView:FormSalesTransaction = new FormSalesTransaction();
     addElement(thePrintView);
                         
     thePrintView.width=printJob.pageWidth;
     thePrintView.height=printJob.pageHeight;
                                             
     thePrintView.prodTotal = prodTotal;
                         
     thePrintView.myDataGrid.dataProvider = salesTransaction;
                         
     thePrintView.validateNow();
                         
     if(!thePrintView.myDataGrid.validNextPage)
     {
          thePrintView.showPage("single");
          printJob.addObject(thePrintView, FlexPrintJobScaleType.MATCH_WIDTH);
     }
     else
     {
          thePrintView.showPage("first");
          printJob.addObject(thePrintView, FlexPrintJobScaleType.MATCH_WIDTH);
          thePrintView.pageNumber++;
                              
          while(true)
          {
               thePrintView.myDataGrid.nextPage();
                                   
               thePrintView.showPage("last");  
                                   
               if(!thePrintView.myDataGrid.validNextPage) 
               {
                    printJob.addObject(thePrintView, FlexPrintJobScaleType.MATCH_WIDTH);
                    break;
               }
               else
               {
                    thePrintView.showPage("middle");
                    printJob.addObject(thePrintView, FlexPrintJobScaleType.MATCH_WIDTH);
                    thePrintView.pageNumber++;
               }
          }
     }
     removeElement(thePrintView);
}          
printJob.printAsBitmap = false;                    
printJob.send();

Here is the result when I print the report:

printout.jpg

I hope you have some time to help me.

Thankz a lot.

Can you check and see if the fact no difference if variableRowHeight attribute set to false?

It looks like a problem of container.

Tags: Flash Builder

Similar Questions

  • My printer prints only half of the document, even when I try to print a Test Page. Said troubleshooting that have no problem

    Original title: device: printer

    Dear Sir/Madam,

                        
    I am a user of windows from win98, and I never had a problem with the printer that I couldn't solve. But now, my printer prints only half of the document, and troubleshooting said: there is no problem, I printed the rpinter windows test page, but I only got half! in view of this, I wonder if you would be so kind as to send me the solution to my problem, my resources and understanding have exhausted. Thank you in anticipation of your kind cooperation.

    Hi Sergio,

    We would like to ask after the details with you to help you to come.

    (1) what is the brand and model of your computer?

    (2) don't you make changes to the printer settings prior to this problem?

    (3) is the issue limited to any particular document?

    (4) do you get an error when the printer is unable to print?

    You might face this question when the printer drivers are corrupt or if the Windows service does not work properly. Follow the troubleshooting methods listed below.

     

    Solve printer problems

    http://Windows.Microsoft.com/en-in/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    You can check the link below.

    Why can I not print?

    http://Windows.Microsoft.com/en-in/Windows7/why-cant-i-print

    Check the question and write us with the State of the question. We will help you if you need assistance.

  • HP Deskjet 1000 printer - just changed the black cartridge for the first time and now it will only print first half of the page. Can anyone help

    HP Deskjet 1000 printer - just changed the black cartridge for the first time and now it will only print first half of the page.  Can anyone help

    Hello Gloria,.

    I ask you to execute methods in the following link and check if the problem is resolved.

    Solve printer problems

    You can also contact the manufacturer to find out how to clean the print head.

    http://h10025.www1.HP.com/ewfrf/wc/siteHome?cc=us&LC=en

    Please get back to us with the State of the question.

  • print only part of the page

    When I tray to print a page only the top quarter is printed.

    Hello

    Thanks for posting your question in the Microsoft Community forum.

    There can be several causes for print does not correctly, which are preventable with the proper tools and even preventable.

    Before we get this problem resolved, I'd appreciate it if you could answer the following questions.

    1. What is the brand and model of the printer?

    2. the problem occurs when printing with all documents?

    3 have there been recent changes to the computer before the show?

    Method 1: I suggest to check printing preferences and make sure you have the right to face-off.

    Choose the printing options: http://windows.microsoft.com/en-US/windows7/Choosing-print-options

    Go through the printer manual on how to change the printing preferences.

    Method 2: Printer in Windows problems.

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    For all windows questions do not hesitate to contact us and we will be happy to help you.

  • printing only half of the text

    I don't see the bottom half of the text when I print my document. How can I solve this problem?

    Hi Casshirtz76,

    Open the drive, go to menu help & repair the installation.

    Otherwise try to print as image PDF print as image. Adobe Acrobat, Reader.

    Check if it solves your problem.

    Kind regards
    Nicos

  • Print module, LR4, Custom package (2) 8 x 12 on Super B paper, PRINTING ONLY HALF OF THE SECOND PHOTO

    What is the problem here? With the help of Epson 1430.

    _M2A2884.jpg

    It looks like a bad printer cable.

  • HP Envy 4500: HP Envy 4500 - photo print half off the page. Print very well.

    All of a sudden, my HP Envy 4500 failed to print all the images; documents continue to print OK.  For photos, the printer acts like it's works fine to start, but print only about half of the photo on the paper - it seeks to print the rest on the back of the photo a lot of ink rollers...

    Research forums, this is the EXACT problem I have:

    http://h30434.www3.HP.com/T5/inkjet-printing/HP-envy-4500-prints-only-half-of-the-photo/TD-p/3781222

    I have uninstalled/reinstalled drivers, try to print from a different computer, laptop and even tried what was suggested in the post above - to copy a picture of the scanner on the printer itself.  Who printed still only half of the picture...

    The consensus from the link above was a hardware problem.  My printer is no longer under warranty, so unless there is another thing I can try I will buy a new printer.   This one isn't worth it for me to pay to ship somewhere to remedy.

    Any last suggestions until I have this gift to local traffic (with a note that it only prints documents)?

    Hi @JPotter,

    You can contact HP customer care to find out what service or the recovery options are available. Check the model number and the form to receive a file number for faster assistance.

    Thank you!

  • HP Officejet Pro 8620 copier copies only half of the document

    During the adjustment of the glass my copier copies only half of the page. When cope since the charger it leaves one side of my page off the coast. I've only had it a few weeks and do not know what to do. Thanks in advance for any help I can get.

    Hello @mburrand welcome to the Forums of HP, I hope you enjoy your experience!

    I see that you are having problems to copy output.  I'd love to try to help you, but I need some information first. I'm a link a few HP Support documents below that will show you how to find what operating system you are using. In addition, if you are using Windows, please indicate if your operating system is 32-bit or 64-bit.

    Mac OS X: how to find which Mac OS X Version is on my computer?
    Operating system Windows am I running?
    Is the Version of Windows on my computer 32-bit or 64-bit?

    In the meantime, I recommend that you perform a power reset.  Unplug the power cord from the printer and the power outlet, then wait 60 seconds. After 60 seconds, plug back in the printer. Make sure that you connect the printer directly to a wall outlet. Make sure to bypass any surge protector or power bar.

    Good luck and please let me know the results of your troubleshooting operations. Thanks for posting on the HP Forums!

  • Trying to run a program, but can't get half of the page is displayed?

    am suppose to follow a course and when trying to watch, only half of the page will be visible on my screen.  I only see half of what's going on.

    1.
    Re - set DPI:
    Right-click on a free space of the desktop > customize
    > column to the left, adjust the size of police (in PPP) > uac prompt > click default
    scale (96 DPI).

    2. resolution:
    Right-click on an open area of the
    Desktop > personalize > Display Setings > move the slider to adjust the resolution.
    Check your user manual, see if she tells you what resolution is for your
    computer.

    Here is a table of the troubleshooting guide line:

     

  • Will not print, but 1/2 on the firefox page and only see half of the page to print preview, but will be printwhole page of IE and quickbooks.

    When I try to print anything on the Web, only the left part of the page will print, nothing in the middle right of the page display. It presents this when you preview before printing. I tried taking OFF reduced to fit and it still does not show the right half of the page, printing is just bigger.
    I can print anything Internet Explorer and Quickbooks, but not from Firefox. I downloaded all the versions up to 5.0. He did print prior to upgrade, but I don't know which version actually worked.

    See if the troubleshooting steps in this article solve your problem: problems printing web pages.

  • OfficeJet Pro 8600 Premium: When copying from the plateau the copier will print only 1/8 of page, then stop.

    Copier is towards the top sometimes & don't print that page of bucket 1/8, Athens he spits as if this one ends. Have unplugged the power cord & reconnected. Ran scans printhead & alignment. Off all night. All the ink levels are good. Still has not corrected it.

    Print an entire page of the screen of the computer without problem. Printing problem just go flat.

    Hi @Wendy-needshelp,.

    Thanks for joining the Forums of HP Support for a solution to your problem copying.

    I understand that you use a HP Officejet Pro 8600 Premium e-all-in-one with a computer and Windows 7 when you copy from sometimes flat it will only copy and print 1/8 of the page. I would like to help.

    You mentioned having unplugged and replugged the power cord. This is something that could be done. If you can, I reset the power and try to connect the printer directly to a wall outlet, if you currently use a protector or electrical surge extention. Sometimes the surge protectors can limit the amout of the power supplied to the printer.

    There was an update firmware released in April, which can help your printer. You can download the update of the firmware and run it from your computer to install it on the printer. You can go to the HP Officejet Pro 8600 N911g_n Firmware download page by clicking here.

    Please let me know if that solves the problem, or if you need assistance.

    Indeed, if this help you to achieve a solution please click the 'accept as Solution' and the 'thumbs up' buttons down below in this message.

    Thank you!

  • Firefox print previews each page in a series correctly but when I print only 1 of 3 pages it prints wrong.

    Firefox print previews each page in a series correctly but when I print only 1 of 3 pages it prints incorrectly, not seen in the preview before printing. I go to the specific page in the Print Range Pages box.
    and crossing point. IE 2 to 2 Pages.

    This has happened

    Each time Firefox opened

    == Always had problem

    What is the URL of the offending site?

    If you can not make it work with just one page, you can print to PDF first, then select your range to print from the PDF file.

  • envy4500 HP does not print (only testpage and partial pages)

    envy4500 HP does not print (only testpage and partial pages)

    Windows 8.1

    the connection usb or eprint even problem

    for two printers ip was added as a port in printer properties

    Help, please

    old brother printer is dead and this news does nothing

    Problem was new printer, new black cartridge but cartridge did not work! Installed another and all = ok.

  • Office Jet Pro 8600: photographic paper Miss Feed print a half or quarter page

    I am trying to print photos, using HP and photographic paper inks.   Print only hafl or quarter-page, waste.  Cannot find listed anywhere problem.  Printer test page came out OK

    Hello @WrenJ

    Thanks for posting on the HP Forums!

    I should be able to provide suggestions to try to help with the 8600 Officejet and printing photos.  You said that is not printing the entire page.  This occurs when printing from a specific program or all programs?  You have the full features of HP software and drivers installed for the Officejet 8600?

    Here is a document for changing the settings to print in Windows 7 to ensure that the parameters are properly changed for the specific print job.  If you print from Adobe Photoshop or another program then I suggest you save the image as a. JPEG and trying to print from the Windows Photo Viewer.

    If you still experience the problem I recommend uninstalling and reinstalling the HP software.

    To uninstall the HP software, click here: uninstall the HP software

    To download the software for Officejet 8600 click here: driver and software complete features Officejet 8600

    Please post back and let me know if this worked for you!

  • Only half of the icons showing on personal bar

    Only half of the icons showing on the bookmarks toolbar, but when I go in the toolbar custom, then click on 'Done' they appeared all over again.

    Thank you... I downloaded the latest edition, and that seems to have solved the problem.

Maybe you are looking for

  • Photos of project - Add Photos to Albums

    Hello!  I am new to the use of the Photos app on my Mac Mini.  I created a project and added some pictures.  I have some photos in an album, but when I hit the add-in (+ within the circle) it only allows me to select "all items, Favorites, or Selecte

  • How to use SMS Messaging and no iMessage on myiPad

    Can't text android contacts from my ipad

  • 0x000000ce BSoD - please help!

    "STOP 0x000000ce DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATION" the BSoD arose three times in the last two weeks on my laptop. Everything started after I installed Kaspersky software (and I have to remove Norton/Symantec/and any other virus re

  • Hp4500 ALL IN ONE

    HP 4500 makes gear grinding just before printing whenever it prints.

  • Source part number or replacement for gx270s heatsink plastic retainers?

    Does anyone know a reference number for the retention of part of radiator in white plastic "live" that have been used in some of the Optiplexes gx270s-era?  Or a source for the purchase of replacement when they break? Thanks in advance for any help.