MSDN > 論壇首頁 > SharePoint - InfoPath Forms Services > Add a logo to browser based form
發問發問
 

已答覆Add a logo to browser based form

解答

  • 2009年7月5日 上午 07:54SYM Wong-A-Ton 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    The article is fine regarding setting up a data retrieve connection into the library.
    But after that it starts going on about adding it to repeating table.

    All I want to do is select one image from the library, not loop through them all and add them to a repeating section.

    Does anyone have instructions on what to do after the data connection has been setup?

    You don't have to use a data connection, nor a repeating table, if you just want to use 1 image and the URL to the image will not change. I've simplified the code for you in this blog post
    S.Y.M. Wong-A-Ton, http://www.bizsupportonline.net (100+ InfoPath articles, tutorials, and solutions), InfoPath blog, InfoPath video tutorials

所有回覆

  • 2009年7月2日 下午 02:28Anuma - GGKTechMVP使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
  • 2009年7月2日 下午 02:28Clayton Cobb 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Did you try already and it didn't work?  You can just insert it into your form template without it being hosted anywhere.  If you want it to be referencing something in a doc lib, then you'll have to create a data connection to that lib and display it in a picture control.  This is not the same as just making it part of your form template on the canvas, but if that's what you want to do...
    SharePoint Architect || My Blog
  • 2009年7月2日 下午 03:02Garry001 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    The article is fine regarding setting up a data retrieve connection into the library.
    But after that it starts going on about adding it to repeating table.

    All I want to do is select one image from the library, not loop through them all and add them to a repeating section.

    Does anyone have instructions on what to do after the data connection has been setup?
  • 2009年7月2日 下午 05:23Clayton Cobb 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Just select it, put it into a data element (using logic to pick that exact pic based on some metadata like filename) on your main data source, drag that element to the canvas, and make it a picture control. 
    SharePoint Architect || My Blog
  • 2009年7月3日 上午 08:47Garry001 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Clayton,

    can you expand on this.

    1.The data connection has been setup.
    2. Insert rich text box into form and filter it (use the new data connection and filter on the name of the image)
    3. There is no option to make it a picture control as it is browser enabled.
  • 2009年7月3日 上午 08:52Clayton Cobb 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Oh yeah - browser form.  I'll have to look back at my form that does it to remember the settings.
    SharePoint Architect || My Blog
  • 2009年7月5日 上午 07:54SYM Wong-A-Ton 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    The article is fine regarding setting up a data retrieve connection into the library.
    But after that it starts going on about adding it to repeating table.

    All I want to do is select one image from the library, not loop through them all and add them to a repeating section.

    Does anyone have instructions on what to do after the data connection has been setup?

    You don't have to use a data connection, nor a repeating table, if you just want to use 1 image and the URL to the image will not change. I've simplified the code for you in this blog post
    S.Y.M. Wong-A-Ton, http://www.bizsupportonline.net (100+ InfoPath articles, tutorials, and solutions), InfoPath blog, InfoPath video tutorials
  • 2009年7月17日 下午 01:38Garry001 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Thanks for the blog, however when I try and paste this into the loading event after this....

     

    Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)

     

    ' Write your code here.

    I receive a number of errors including...

    Error 1 'XPathNavigator' is a type and cannot be used as an expression. C:\Documents and Settings\sharepoint\My Documents\InfoPath Projects\Template1\FormCode.vb 30 1 Template1

    Am I missing something simple?

  • 2009年7月18日 上午 04:04SYM Wong-A-Ton 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    It looks like you want to use Visual Basic code instead of C#? The code in the blog post is C#. So you can do one of two things:
    1. Set the programming language for your InfoPath form template to use C#.
    2. Convert the C# code to Visual Basic.

    I've updated the post with the Visual Basic version, if you want to go with the second option.

    S.Y.M. Wong-A-Ton, http://www.bizsupportonline.net (100+ InfoPath articles, tutorials, and solutions)