Printing from my application?

Help
2009-09-09
2013-04-26
  • Lothar Behrens
    Lothar Behrens
    2009-09-09

    Hi,

    I have figured out how to use rptrender to print my reports from my application. My application is wxWidgets based so I simply have chosen calling the executable to simplify my solution as a first version. I am able to directly print into the preview window and therefore I don't see the main window (-printpreview) and (-close) it
    automatically after printing.

    My problem:

    I am tried this first on my Mac OS X (Leopard) and the window is not in foreground. Is this a problem of my application (not going to background) or rptrender not forcing to be in foreground?

    Any ideas?

    Thanks

    Lothar

     
  • Chris Ryan
    Chris Ryan
    2009-09-15

    Mac can be a little funny sometimes. There is not code in the rptrender application to push it or other windows into the foreground and I don't know what, if any, the Qt libraries are providing. If you are calling the application directly on the mac using command line arguments then you are slightly working around the whole package framework setup Mac likes. I have never experienced a problem doing this but have seen reports and warning messages that this could lead to unexplained problems. It is possible that the window showing up in the background could be one of them.

    My only suggestion at this point might be to try compiling the OpenRPT project and doing some testing to see if there is some Qt call that could be used to push the window to the foreground with your setup. One other thought is that the rptrender window could be in the foreground and your app may be regaining focus and pushing itself to the top. If that is the case you may be able to see if you can prevent that from happening before the rptrender application has finished executing.