PrintToPrinter doesn't flush print buffer to printer

Post Author: jtkaylor
CA Forum: .NET
I'm having a problem with PrintToPrinter.
I have a VB.NET app  that sends a Crystal Report to the printer after it has displayed it in the viewer. The program runs fine aside from the fact that the first print job doesn't get sent to the printer until the second report is displayed, and the second doesn't get printed until the third report is displayed, ad infinitum.
I  am just using the following statement:
myReport.PrintToPrinter(1, False, 1, 1)
I am not setting any printer properties, just am using the defaults.
I am using Visual Studio 2003.
Any ideas of what might be the problem?

Post Author: jtkaylor
CA Forum: .NET
I realized my mistake - I perform the PrintToPrinter command after I have received the event from the barcode scanner, but before the report has rendered/refreshed. I had only to call the viewer's RefreshReport method prior to calling PrintToPrinter.

Similar Messages

  • Why doesn't G510n print photos with premium photo paper

    I just received the G510n Wireless for Christmas.  I tried printing a Photo on Premium Photo Paper and it does not come out.  I can't find Photo Ink for this printer.  Doesn't this printer have the capability to print Photos on Photo Paper?
    This question was solved.
    View Solution.

    HI Dawn3905,
    Yes your printer does have the capability to print photos on photo paper.
    I'm not sure what operating system you are using but here is a link that shows how to print using photo paper in Mac OS 10.5 or later.
    Also here is a link to your printers manual with instructions on how to print photos in windows as well.
    Hope this is helpful.
    If I helped you at all it would be great if you clicked the blue kudos star!
    If I solved your post please mark it as solved to help others.
    I'm a printer tech with HP.

  • 10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-25
    10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE
    ===============================================
    PURPOSE
    이 자료는 Oracle 10g new feature 로 manual 하게
    buffer cache 를 flush 할 수 있는 기능에 대하여 알아보도록 한다.
    Explanation
    Oracle 10g 에서 new feature 로 소개된 내용으로 SGA 내 buffer cache 의
    모든 data 를 command 수행으로 clear 할 수 있다.
    이 작업을 위해서는 "alter system" privileges 가 있어야 한다.
    Buffer cache flush 를 위한 command 는 다음과 같다.
    주의) 이 작업은 database performance 에 영향을 줄 수 있으므로 주의하여 사용하여야 한다.
    SQL > alter system flush buffer_cache;
    Example
    x$bh 를 query 하여 buffer cache 내 존재하는 정보를 확인한다.
    x$bh view 는 buffer cache headers 정보를 확인할 수 있는 view 이다.
    우선 test 로 table 을 생성하고 insert 를 수행하고
    x$bh 에서 barfil column(Relative file number of block) 과 file# 를 조회한다.
    1) Test table 생성
    SQL> Create table Test_buffer (a number)
    2 tablespace USERS;
    Table created.
    2) Test table 에 insert
    SQL> begin
    2 for i in 1..1000
    3 loop
    4 insert into test_buffer values (i);
    5 end loop;
    6 commit;
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    3) Object_id 확인
    SQL> select OBJECT_id from dba_objects
    2 where object_name='TEST_BUFFER';
    OBJECT_ID
    42817
    4) x$bh 에서 buffer cache 내에 올라와 있는 DBARFIL(file number of block) 를 조회한다.
    SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
    2 from x$bh where obj= 42817;
    TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD J
    9 23 23 1297 8 1 0 7
    9 23 23 1298 9 1 0 7
    9 23 23 1299 4 1 0 7
    9 23 23 1300 1 1 0 7
    9 23 23 1301 1 1 0 7
    9 23 23 1302 1 1 0 7
    9 23 23 1303 1 1 0 7
    9 23 23 1304 1 1 0 7
    8 rows selected.
    5) 다음과 같이 buffer cache 를 flush 하고 위 query 를 재수행한다.
    SQL > alter system flush buffer_cache ;
    SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
    2 from x$bh where obj= 42817;
    6) x$bh 에서 state column 이 0 인지 확인한다.
    0 은 free buffer 를 의미한다. flush 이후에 state 가 0 인지 확인함으로써
    flushing 이 command 를 통해 manual 하게 수행되었음을 확인할 수 있다.
    Reference Documents
    <NOTE. 251326.1>

    I am also having the same issue. Can this be addressed or does BEA provide 'almost'
    working code for the bargin price of $80k/cpu?
    "Prashanth " <[email protected]> wrote:
    >
    Hi ALL,
    I am using wl:cache tag for caching purpose. My reqmnt is such that I
    have to
    flush the cache based on user activity.
    I have tried all the combinations, but could not achieve the desired
    result.
    Can somebody guide me on how can we flush the cache??
    TIA, Prashanth Bhat.

  • Flushing Database Buffer Cache

    I am trying out variants of a SQL statement in an attempt to tune it. Each variant involves joins across a different combination of tables, although some tables are common across all variants. In order to be able to do a valid comparison of the TKPROF outputs for the variants, I believe I need to flush the database buffer cache between variants so that the db block gets, consistent gets and physical reads parameters are true for each variant. By doing this, data retrieved for one variant is not already in the buffer cache for the next variant, thus not influencing the above parameters for the next variant.
    Is it possible to flush the buffer cache? The shared pool can be flushed with the ALTER SYSTEM FLUSH SHARED_POOL command. I've searched but have not been able to find an equivalent for the buffer cache. The NOCACHE option to the ALTER TABLE command only pushes retrieved data to the LRU list in the buffer cache, but does not remove it from the buffer cache.
    I'm hoping to be able to do this without bouncing the database between variants. It is a development instance, and I have it to myself after hours.

    Hi,
    I never tried this before, but if you want make a test you can try corrupt the block ID's returned by one of these queries below:
    Try corrupt the ID of the block containing the segment header
    select dbms_rowid.rowid_block_number(rowid) from hr.regions;
    Try corrupt one of the blocks returned by the query, which shows the ID of the block where each row is located
    select s.owner,t.ts#,s.header_file,s.header_block
    from
    v$tablespace t, dba_segments s
    where
    s.segment_name='REGIONS' and
    owner='HR' and
    t.name = s.tablespace_name;Legatti
    Cheers

  • Why doesn't mail print the .ics details shown on screen?

    I have colleagues using outlook and I of course use mail.
    When they send me meeting requests I get a .ics file I can use in iCal.
    The details of the .ics file (e.g. agenda) displays OK in mail.
    But when I want to print the mail to take to the meeting, it just shows the .ics icon, nothing else.
    Browsing the discussions, this was a problem back in 2007 in Tiger, but fixed there and subsequently.
    Why have we got this "feature" back now in Lion? (The old fix - print from Get Info in iCal - doesn't work in Lion.  Must be the cheap leather finish)
    Any cures?

    Have you tried using the '''Print''' item at the bottom if that eBay page? <br />
    Or is that what you are using?
    Overall it isn't unusual for "print" to be a bit different than what shows on the "screen", that page may use @media for "screen" and for "print". The '''Print''' item on that page could be the difference, or the web browser might be following that code is you used the '''Print ''menu item or button''''' in Firefox. <br />
    http://www.w3.org/TR/CSS2/media.html#media-types
    Typically, the '''@print''' CSS code is used to hide navigation menu's ''(can't "navigate" to a different web page from a sheet of paper)'' and maybe advertisements ''(can't "click" on an ad that is on paper)'' from being printed out so that only the text of an article is printed to paper.
    Basically, it's probably not a fault with Firefox, but rather Firefox following the commands on the page put there by the person who authored that page, or a standard CSS "style sheet" used by eBay.

  • HP laptop (Windows) doesn't recognize printer

    I have an Airport Express. Cable modem is plugged into it. HP PhotoSmart 3210 is plugged into USB. RCA jack is running from AE to receiver. My iMac can access the internet (wireless airport connection), and I can print to the HP. However, I can't see the printer on the network. I have an HP laptop running windows xp. It recognizes the network, and I can connect to the internet. It doesn't recognize the printer either. Any suggestions?
    imac 2.16 ghz intel   Mac OS X (10.4.8)  

    Printing from a Windows XP PC to a printer attached to an Airport Extreme Base Station or Airport Express
    http://tech.ifelix.net/1004.html
    Printing from a Windows XP PC to a printer attached to an Airport Extreme Base Station or Airport Express using Bonjour
    http://tech.ifelix.net/1008.html
    Problems with finding Printer Driver on Windows XP when using printer connected to Airport Extreme or Express
    http://tech.ifelix.net/1012.html

  • Reader x 10.1.3 doesn't show print dialog when printing, for some users on Terminal Server

    We are running Windows Server 2003 with Terminal Services for approximately 10 remote users.
    A few days ago, some users started to complain about not being able to print pdf documents to their printer. I discovered that the print dialog box doesn't open, so they can't even select another printer.
    If reader is set to open in browser, it just crashes the browser, if it set to open in Reader itself, it does nothing, no dialog,
    I've tried removing the printer and reinstalling. Since it works from the console without issues, I thought it may be permissions related, so I added users to administrators group, with no success.
    They can print from Outlook, Word, etc....just not pdfs.
    Can anyone help?
    Printer HP MFP 3027 PCL 6

    Can you please see if launching the Preferences window from within Adobe Reader standalone application works?

  • I have Adobe Reader X on Windows Vista. Why doesn't the Printer for Adobe PDF show up in my Hardware/printers? Or can I add it to the Hardware/Printers?

    I have Adobe Reader X in Windows Vista. Why doesn't the Adobe PDF show up as a printer in my Hardware/Printers? Or can I add it to the Hardware/Printers? And how?

    Adobe Reader - FREE - reads PDF files, prints them, fills forms.
    Adobe Acrobat - $$ - as Reader, and makes PDFs and edits them, sorta, and does a bunch more.
    So if you had Acrobat try and find the license to avoid having to pay again...

  • Bonjour doesn't recognize printer

    I have a Vista 64bit machine with a Brother DCP 7020 printer connected via USB. I've installed Bonjour for Windows and it doesn't show the printer. My MBP can see the printer across the Airport network but cannot print.
    Any ideas why Bonjour isn't showing the printer?

    I got this working by connecting the USB printer into the Time Capsule. Then selecting "Share printers over WAN" from inside Airport Utility Printers tab.

  • Ibook doesn't see printer

    I have an ibook G4 and it has been printing by connecting wirelessly through airport to my imac that has an HP5500 printer connected to the imac. For an unknown reason, it suddenly doesn't list that printer. I can still print if I carry the ibook to the printer and connect it by usb. When I try to add a printer, it doesn't find any other printers in the house so nothing comes up on the list. It used to have that printer listed as hp5500-imac. How can I get it to find that printer again?

    Is there a provision to see and use the HP through Bonjour printing?
    One of mine is accessed that way, via USB and AirPort express base.
    My Epson connects that way, while an HP all-in-one refuses totally.
    There are times when I connect by-wire since all features of the
    Epson are not supported wireless. The printer's Utility, mostly.
    There may be some other settings to consider; but I don't remember
    what the others may be in this instance. Once my primary desktop is
    on, and two different printers work from there, that about covers it
    for me. The other computers can use the Epson via AirPort Express;
    including my iBook G4. For print head maintenance, I run a USB wire.
    Perhaps someone with that model printer may have an idea; or maybe
    you'd have to try installing a new printer driver if it may be corrupted.
    Sorry to not have a definite answer to the situation. Sometimes, each
    time you have to choose a printer (even if using a USB printer, wireless)
    you have to be certain the printer is being selected. Not sure why it isn't.
    Good luck & happy computing!

  • PRT file doesn't work (printer codes) (urgent)

    Hi,
    I've got a small problem using a custom prt file for printing reports on a Epson TM-T88 printer.
    I'm trying to use the printer codes which are in the programming manual of the Epson printer for cutting the paper.
    But it doesn't work.
    This is the prt-file:
    printer "kassabon"
    before report esc "@"
    after report dec (27) dec (86) 1 dec (27) dec (105)
    Who can solve this problem?
    It's very urgent.
    Thanks in advance!
    null

    Nobody?

  • Hp5530 doesn't finish print job

    I have two computers, a win7 laptop and a win8.1 desktop. My 5530 is set up as a wifi printer and is next to my Linksys wireless router.  Both printers wil print to the printer but often the print job doesn't finish -  stopping in the middle of a page.  The problem seems to be evolving in that for a few months the problem only showed up when printing from the win 8.1 computer.  Now it happens with both computers, more and more often.  I've reinstalled the drivers on both computers with no change in outcome.  Please help.

    Hello domeguy,
    Welcome to the HP Forums.
    I see that you are having some issues with the Wireless connection.
    I do have a few suggestions that we can try in the attempt to resolve this issue.
    First off, please make sure that you have the printer power cable connected directly to a wall outlet and not a power bar/strip. Here is a document that uses a LaserJet printer as an example but it is meant for HP products in general. Please click on the following link that explains the Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector.
    I also suggest that you have the router more than 4' from the printer and less than 20'.  This will be the range that you need to have the printer from the router to ensure a solid connection.  If the Printer less than 4' from the router and will not be detected.
    I have another suggestion. Try the HP Print and Scan Doctor on both computers.  Let me know if you see any error codes or messages.
    The last link I have for you deals with when the Printer Does Not Maintain Wireless Connection.
    Thanks for your time.
    Cheers, 
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Cant flush printing queue

    Hello guys,
    Im developing a POS application on NB IDE 6.1 with JDK 1.6 on Swing
    The problem im facing at the moment is that once I try to print a ticket (or the exact word is receipt?), it works perfectly but after that one, the next tickets will show the information of the last ones.
    I dont know if Im explaining myself well... if I print the first ticket, I see the ticket printed correctly. But when Im going to print another one, I get the last ticket printed and the new one.
    For this matter Im using the Printable Interface.
    What I do is this:
        Print p = new Print(imprimir);
        p.PrintAndCut();//this one does the dirty job for meAfter this Ive tried calling System.ou.flush() with no help.
    Here is the code of the class:
    public class Print  implements Printable {
       static JTextArea textarea = new JTextArea();
       static JFrame   window = new JFrame("Print Sample");
        public Print(String imprimir) {
            Font titleFont = new Font("helvetica", Font.BOLD, 12);
            textarea.setFont(titleFont);
            textarea.append(imprimir);
      public static void main(String args[])   {
        final Container cp = window.getContentPane();
        LayoutManager lm = new FlowLayout(FlowLayout.CENTER, 20,20);
        textarea.setEditable(false);
        window.setVisible(false);
      //this is the function I use to print anything I want on the POS printer
       public void PrintAndCut() throws Throwable {
          PrinterJob printerjob = PrinterJob.getPrinterJob();            // get a printer job object
          PageFormat format = new PageFormat();//job.defaultPage();
          format.setOrientation(PageFormat.PORTRAIT);
          printerjob.setPrintable(this, format);     
          try {
             printerjob.print();            // print the page(s)  (this method with call the page painters)
            } catch (PrinterException exception) {
             System.err.println("Printing error: " + exception);
       public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
          throws PrinterException {
           String strText =null;    // text string to output
           int lineStart;           // start index of line in textarea
           int lineEnd;             // end index of line in textarea
           int lineNumber;          // current line in textarea
           int lineCount;           // total number of lines in textarea
            if (pageIndex >= 1 )
               return Printable.NO_SUCH_PAGE;
           // move the drawing origin to the imageable area ( makes sure its drawn where the printer can )
           graphics.translate((int)(pageFormat.getImageableX()), (int)(pageFormat.getImageableY()));
           graphics.setColor(Color.black);
           // get the text from the textarea one line at a time
           lineNumber = 0;
           lineCount = textarea.getLineCount();
           strText = textarea.getText();
           while (lineNumber < lineCount) {
              try {
                 lineStart = textarea.getLineStartOffset(lineNumber);
                 lineEnd = textarea.getLineEndOffset(lineNumber);
                 strText = textarea.getText(lineStart, lineEnd-lineStart);
              } catch( Exception exception) {
                 System.out.println("Printing error:" + exception);                  // have to catch BadLocationException
              // determine drawing location of each successive line
              graphics.drawString(strText,0,(lineNumber + 1) *20);
              lineNumber = lineNumber + 1;
            return Printable.PAGE_EXISTS;                      // page was drawn successfully (return NO_SUCH_PAGE if not)
       }Any help or advice would be appreciated. Thanx

    I have also tried System.out.close();
    I just dont know what else I can do.
    Thnx

  • Why doesn't photobooth print passport size pictures

    The photobooth name and icon both suggest it could be used to print passport size pictures. I don't understand why it doesn't. Or does it and I'm being really stupid. I know the dimensions are different to a passport picture but I've got a pair of scissors to solve that problem. If photobooth did this then it would be a really useful application and mean that I wouldn't have to walk up to the station in the rain everytime I want a passport photo.......... and I could have bulging eyes on my ID.
    iphoto won't let you print passportsize pictures either.

    Operating system?
    Does your printer support borderless printing?  Can you print a borderless print from another application?
    Ken

  • Safari doesn't remember print settings

    hi all
    i'm using safari 1.3.2 under panther, & i want to print a bunch of web pages with a layout of 2 pages of text per printed page. this works fine when i use the layout feature in the print dialog box, but the problem is that i have to do this every time. how can i get safari to remember my previous print settings? or is this possible?
    thanks in advance for any suggestions/comments!
    brian

    Hi Brian,
    I'm not on my Mac at the moment, but if memory serves, I believe after making the necessary customisation with regards to layout, paper handling, you can click on the 'presets' field and save your particular scheme for use in the future. I'm not sure if you can specify a user-created scheme as default but I'd imagine it's possible as well.
    I hope Tiger and Panther are similar at least in that respect. All the best!
    Yang

Maybe you are looking for

  • WBS Standard report and customized reports

    Hi Frnds we have one SAP standard reports for WBS elements ( plan/actual/variance) and one whichis customized project management report in Projects systems but both the reports are showing different balance. is there any particular reason for showing

  • Soundbanks percussion kit and EAX microphone problems

    I bought the PCMCIA Audigy ZS notebook to use it with my notebook HP Pavillon ZS6000 (Athlon 3200, 1 Gb RAM) having the hobby to sing with friends using karaoke software like Van Basco or Karawin. I bought it in a blister pack at the end of August. I

  • Whiteboard & Powerpoint share failing !!

    Hello All, I am having issues with sharing the Whiteboard and Powerpoint with external users. The error which I am getting is "Some sharing features are unavailable due to server connectivity issues" which seems to be a generic error. I cant say if t

  • Is there any way out in business explorer to calculate key figures

    Hi friends, I need your help to calculate key figure in run time, actually I have a infoset of billing item and stock transfer order (STO) with purchase requsition (PR) . one STO line no. is having multiple PR for example one STO line of 100 nos qty

  • ITunes 11 duplicated songs - duplicates have iCloud icon

    After updating to iTunes 11 many songs in my music library have been duplicated. The duplicate songs have an iCould icon next to them in the songs list. If I delete the duplicate (the one with the iCould icon), that song is no longer available for me