A slight printing problem - InfoPath Dev
in

InfoPath Dev

A slight printing problem

Last post 05-09-2006 07:44 AM by Razor. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-04-2006 07:10 AM

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    A slight printing problem

    Hi,

    I'm working on a large form which will display text data in table format and pictures (drawings). Text and drawings will be separated with page breaks.

    The text data will be printed with portrait orientation size A4 and the drawings will be landscape and A3. Is this possible with InfoPath? I know that I could use views to manage this but the customer requirement is a "one click print functionality".
  • 05-05-2006 07:03 PM In reply to

    Re: A slight printing problem

    I always say, anything is possible, the question is whether or not you want to spend the time that it will take to achieve it. However, I think you could do this without too much trouble by using two different views and a little bit of code behind your button. To provide one-click printing functionality I would do this:

    1. Place the button on the text data view.
    2. Place code behind the button that prints the current view, switches to the drawing view and then prints it.

    The bad thing is that you must use full trust if you want to call the PrintOut() method for printing. To setup page size and orientation open the View Settings dialog box by double-clicking the view in the Views task pane.

    I hope this helps!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-09-2006 07:44 AM In reply to

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    Re: A slight printing problem

    Thanks for your reply Matt!

    I tried your suggestion but the printer refuses to change the settings between the PrintOut() calls. It works only if I print one view at the time. I was using this code with a button on the default view:

    thisXDocument.PrintOut()
    thisXDocument.View.SwitchView("A3")
    thisXDocument.PrintOut()

    First I print the default view in A4 size. Then I switch view to A3 which is set to be printed as A3 but comes out as A4. If I print out only view A3 it will come out A3. I thought two PrintOut() calls was two print jobs?
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.