JScript print statement - InfoPath Dev
in

InfoPath Dev

JScript print statement

Last post 03-29-2010 03:47 AM by Qazi Anis. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-21-2005 06:50 AM

    JScript print statement

    Can someone tell me if I'm doing this right?

    XDocument.Submit();
    if((int)XDocument.DOM.selectSingleNode("//my:WeekTotal").text <= 35)
    {XDocument.PrintOut();}

    Alls I'm trying to do is after the submit to database is if the WeekTotal Field is under 35, it auto prints.

    I don't know if it's right though, cause it won't work for me.
    Thanks!
  • 06-21-2005 04:18 PM In reply to

    Re: JScript print statement

    Depending on what language you are coding in:

    ----------
    C#:
    ----------
    if(Convert.ToInt32(thisXDocument.DOM.selectSingleNode("/my:FullXPath/my:WeekTotal").text) <= 35)
    thisXDocument.PrintOut();

    ----------
    JScript:
    ----------
    if(parseInt(XDocument.DOM.selectSingleNode("/my:FullXPath/my:WeekTotal").text) <= 35)
    XDocument.PrintOut();

    Also keep in mind that using PrintOut() requires your form to be set to Full Trust security.

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 03-26-2010 12:22 PM In reply to

    Using infopath 2007 in VS 2008 this statments do not work!

    thisXDocument does not exist. do I have to reference something else?

    Ofer
  • 03-29-2010 03:47 AM In reply to

    try this.

    if (Convert.ToInt32(this.MainDataSource.CreateNavigator().SelectSingleNode("FullXPath", this.NamespaceManager).Value) <= 35)

    {

    this.Print();

    }

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.