????? ????? ????? ????? ?????????? ????? InfoPath ???????

?????? ????????? ?????? ?????????
???? ???????: 826997 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? Microsoft Office InfoPath ????? ??? ??? ??????. ?? ????? ??? ????????. ??? ??? ????? ?? 2010 InfoPath Microsoft ?? Microsoft Office InfoPath 2007 Microsoft Office InfoPath 2003 ??? ??????? ?? ????? ????? ??????????. ????? ??? ??????? ??? ???? ?? ????? ????? ????? ????? ?????????? ????? InfoPath ???????.

????? ????? ????

  1. ??? ????? InfoPath.
    • ?? InfoPath ???? 2010:
      1. ???? ??? ???? ? ???? ??? ????? ???? ?? ???? ??? ????? ???????.
    • InfoPath 2007:
      1. ???? ??? ????? "???? ?????" ?? ??????? ???.
      2. ???? ??? ???? ?? ??? ?????? ????? "???? ?????" ?? ???? ??? ?????.
    • ?? InfoPath 2003:
      1. ???? ??? ????? ????? ??????? ???.
      2. ???? ??? ????? ???? ???? ?? ??? ?????? ????? ?????.

????? ??? 1

?? InfoPath 2010:
  1. ?? ??????? ????? ?????? ????? ??? ??? 1 ??????? ??????? ????? ?? ???? ???? ??? 2 ??? ??? ??????? ???? ????? ??????.
  2. ???? ??? ?? ?????? ?? ????? ????? ??????.
  3. ???? ????? ??????? ??? ???? ?????? ?? ????? ??????.
  4. ???? ??? ????? ???.
InfoPath 2003 ? InfoPath 2007:
  1. ?? ??????? ????? ???? ??? ?? 1 ??? ????? ?????, ?? ???? ?????? ???? ??? 2 ??? ??? ???? ??????? ??? ????? ??????.
  2. ???? ??? ?? ?????? ?? ????? ????? ??????.
  3. ??? ??????? ???????? ????? ?????? ???? ??? ????? ??????.
  4. ?? ??? ?????? ????? ??????? ???? ??? ???? ??????.
  5. ???? ??? ????? ???.

????? ??? 2

?? InfoPath 2010:
  1. ???? ??? ????? ??????? ????? ?????? ????? ????? 1 ??? ????? ????? ?????????? ???????.
  2. ?? ?????? ??? ?????? ???? ??? ????? ??? ?????.
  3. ???? ??? ??? 2 ??? ?? ???? ??? ?????.
  4. ?????? ??? ???????? ???? ??? ?? ??? 2.
InfoPath 2003 ? InfoPath 2007:
  1. ??? ??????? ???????? ????? ?????? ???? ??? ??? ???.

    ????? ????? 1 ?? ????? ????? ?????????? ???????.
  2. ?? ?????? ????????? ?? ??? ?????? "? ???? ??? ????? ?????" ??? ????? ".
  3. ???? ??? ??? 2 ??? ?? ???? ??? ?????.
  4. ?? ??????? ????? ?????? ????? ??? ??? 2.

????? ?????? ???

InfoPath 2007

???? ????? ??? ??????? ???? ???? ????????? ?? InfoPath 2010 ?2007. ??????? ??????? InfoPath 2003? ???? ??? ??????? ?? ?? ???????? ??????? ????? ???????? ?????.

?????? ?????? ??? ?????? ?? C# ??? ???????. ????? ??????? Visual Basic ?? ?????? ???? ??????.
????? ??? ???????
?? InfoPath 2010:

??? ????? ??? ???????? ????? ????? ?? InfoPath 2010 ? ??? ????? ??? ??????? ??? C#. ?????? ????? ???? ??????? ???????.

????? ????? "????? ????????? ????????" ?????? ???? ?? ??????? ??????? ?????? ???? ????????? ???????? ???????? ?? ??????? ??????. ????? ?? ?????? ??? ?????? ?? ?? ??? ??????? ?? ??? ???? ????? ??? ???????.
  1. ???? ??? ????? ????? ??????.
  2. ?? ?????? ??????? ?????? "? ???? ??? ????? ?? ???? ??? ????? ???????. ??? ?? ????? ???? ??? ????????? ???????? ????? ??????? ???? ??? ????? ????????? ???????? ??? ????? ???? ????????? ???????? ???????? ?? ???????. ??? ????? ???? ??? ????????? ???????? ????? ????? ? ????? ??? ?????? ???????.
  3. ?? ??????? ??? ????????? ???????? ????? ????? ? ???? ?????? C# ?? ???? ??? ?????.
InfoPath 2007:

??? ????? ??? ???????? ????? ????? ?? InfoPath 2007 ? ??? ????? ??? ??????? ??? C#. ?????? ????? ???? ??????? ???????:

????? ????? "????? ????????? ????????" ?????? ???? ?? ??????? ??????? ?????? ???? ????????? ???????? ???????? ?? ??????? ??????. ????? ?? ?????? ??? ?????? ?? ?? ??? ??????? ?? ??? ???? ????? ??? ???????.
  1. ?? ??????? ?????? ???? ??? ?????? ???????.
  2. ?? ??????? ??? ? ???? ??? ???????. ??? ?? ????? ???? ??? ????????? ???????? ????? ??????? ???? ??? ????? ????????? ???????? ??? ????? ???? ????????? ???????? ???????? ?? ???????. ??? ????? ???? ??? ????????? ???????? ????? ????? ? ????? ??? ?????? ???????.
  3. ?? ??????? ??? ????????? ???????? ????? ????? ? ???? ??? C# ?? ???? ??? ?????.
?? ?????? ???????? ?????
?? InfoPath 2010:

?? ?????? ???????? ????? ??? ????? ???????. ?????? ????? ???? ??????? ???????:
  1. ??? ????? ??????? "??????" ? ???? ??? ????? ???. ???? Microsoft Visual Studio ????? ?????????.
  2. ????? ???? ???????? ???????? ??????? ?? ??????? ?????? ?????.
    {
                //Create an XPathNavigator object for the main DOM
                XPathNavigator xnDocument = this.MainDataSource.CreateNavigator();
    
                //Create an XPathNavigator object for field1 - the check box for switching the View
                XPathNavigator xnDefaultView = xnDocument.SelectSingleNode("/my:myFields/my:field1", this.NamespaceManager);
          
                //Make sure that the XPathNavigator object is not null or an empty string
                if ((xnDefaultView != null) && (xnDefaultView.Value != ""))
    
                {
                    //Switch to the appropriate View
                    switch (xnDefaultView.Value)
    
                    {
                        case "false":
                            e.SetDefaultView("View 1");
                            break;
    
                        case "true":
                            e.SetDefaultView("View 2");
                            break;
    
                    }
            }
    }
    
  3. ??? ????????? ?? ?? ?????? ????? Visual Studio ?????????.
  4. ??? ???? ??????? ????? ?? SwitchDefaultView.xsn ?? ?? ?????? ???? ???????.
?????? ??? InfoPath 2007

?? ?????? ???????? ????? ??? "??? ?????". ?????? ????? ???? ??????? ???????:
  1. ?? ??????? ?????? ??? ??? ??????? ?? ???? ??? ????? ???????. ???? Microsoft Visual Studio ????? ?????????.
  2. ????? ??? ?????? ?????? ??? ????? Age_OnValidate.
    {
                //Create an XPathNavigator object for the main DOM
                XPathNavigator xnDocument = this.MainDataSource.CreateNavigator();
    
                //Create an XPathNavigator object for field1 - the check box for switching the View
                XPathNavigator xnDefaultView = xnDocument.SelectSingleNode("/my:myFields/my:field1", this.NamespaceManager);
          
                //Make sure that the XPathNavigator object is not null or an empty string
                if ((xnDefaultView != null) && (xnDefaultView.Value != ""))
    
                {
                    //Switch to the appropriate View
                    switch (xnDefaultView.Value)
    
                    {
                        case "false":
                            e.SetDefaultView("View 1");
                            break;
    
                        case "true":
                            e.SetDefaultView("View 2");
                            break;
    
                    }
  3. ??? ????????? ?? ?? ?????? ????? Visual Studio ?????????.
  4. ??? ???? ??????? ????? ?? SwitchDefaultView.xsn ?? ?? ?????? ???? ???????.

InfoPath 2003

?????? ???????? ????? ?? InfoPath 2003? ???? ??????? ???????:
  1. ?? ??????? ?????? ??? ??? ???????? ????? ??? ?? ???? ??? Microsoft Script Editor.
  2. ?? ?????? ????????? ???????? ??????? ??? ???? ????????? ????????: ????
    function XDocument::OnLoad(eventObj)
    {
    	//Pick the default view based on the value of element DefaultView
    	var objDefaultView = XDocument.DOM.selectSingleNode("//my:field1");
    
    	if ((objDefaultView != null) && (objDefaultView.text != ""))
       	{
    		switch (objDefaultView.text)
          		{
             		case "false":
    				    XDocument.ViewInfos("View 1").IsDefault = true;
                			break;
             		case "true":
                			XDocument.ViewInfos("View 2").IsDefault = true;
                			break;
          		}
       	}
    }
  3. ??? ???????? ????? ?? ?? ?????? Microsoft Script Editor.
  4. ??? ???? ??????? ????? ?? SwitchDefaultView.xsn ?? ?? ?????? ???? ???????.

?????? ?????? ???

?????? ??? InfoPath 2010
  1. ???? ??? Microsoft Office InfoPath.
  2. ???? ??? ????? ??? ??????? SwitchDefaultView.xsn ???? ?? ???? ??? ???.

    ??? ??? ??????? ?? ????? ????? 1 (????? ????? ?????????? ??????).
  3. ???? ?????? ???? ???????? ??? 2.
  4. ???? ??????? SwitchDefaultViewForm.xml ?? ?? ?????? ???????.
  5. ??? ????? ??????? "???" ? ???? ??? ????? ?? ???? ??? ???.
  6. ??? ???? SwitchDefaultViewForm.xml ?? ???? ??? ???.
??? ??? ??????? ?? ????? ??? 2.

InfoPath 2003 ? InfoPath 2007:
  1. ?? ??????? ???? ???? ??? ????? ?????.

    ?????? ???? ?? ????? ??????? ?? ??? ?????? ????? ?? ?????? ???????. ?????? ?? ???? ?? ????? ??????? ????? ????? ?????????? ?? ????? OnLoad. ????? ??? ?????? ????? ????? ??????? ?????? ?? ???? InfoPath ?????.
  2. ?? InfoPath 2007? ???? ??? SwitchDefaultView ??? ??? ?????.

    ?? InfoPath 2003? ???? ??? SwitchDefaultView ?? ??? ??????.

    ??? ??? ??????? ?? ????? ????? 1 (????? ????? ?????????? ??????).
  3. ???? ?????? ???? ???????? ??? 2.
  4. ???? ??????? SwitchDefaultViewForm.xml ?? ?? ?????? ???????.
  5. ?? ??????? ???? ???? ??? ???.
  6. ??? ???? SwitchDefaultViewForm.xml ?? ???? ??? ???.
??? ??? ??????? ?? ????? ??? 2.

???????

???? ???????: 826997 - ????? ??? ??????: 30/????? ??????/1431 - ??????: 4.0
????? ???
  • Microsoft Office InfoPath 2007
  • Microsoft Office InfoPath 2003
  • Microsoft Office InfoPath 2003, Service Pack 1 (SP1)
  • Microsoft Infopath 2010
????? ??????: 
kbmt kbhowto KB826997 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????826997

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com