Renderform - dissapearing images - InfoPath Dev
in

InfoPath Dev

Renderform - dissapearing images

Last post 02-08-2013 06:54 AM by Philip Saxegaard123. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-07-2013 07:56 AM

    Renderform - dissapearing images

    Hi,

     

    Background: I'm developing a competense system for my company based on Infopath and with help from qrules. Being able to print out a diploma is one of the demands for this system. I've created a separate view for the diploma, and made it pretty by adding a few pictures to the view. I then render that particular view --> attach it in an file-attachment control in a reperating table along with som employee info--> submits it to a sharepoint list using SubmitToSharepointList.

    Problem: It all works well, except for one thing: When i go to the sharepoint list and open up the listelement to see the attached diploma, it will not show any pictures. They are all gone. Why? And is there a way oround this?

     Greetings

    Philip

  • 02-07-2013 08:04 AM In reply to

    Re: Renderform - dissapearing images

    Hi Philip,

    I'm sorry you've run into problems with this command.

    This view that is being used by the Render command, the picture is included in the view using a file attachment control, within a repeating table - is this correct?

    If you'd like, you can include attachments (screenshots, or even the form itself) via the Options tab when replying. I'd like to reproduce this scenario on our environment to see what I discover. Any additional information that you'd like me to consider will be most welcome.

    Thank you.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 02-07-2013 08:24 AM In reply to

    Re: Renderform - dissapearing images

    No, the picture is just inserted in the diploma view by useing the "Insert Picture" button in the "Insert" tab in infopath designer. I tried to attach the form.xsn that i use. Not sure if i got the attachment to this reply to work correct :O

    Philip

  • 02-07-2013 10:15 AM In reply to

    Re: Renderform - dissapearing images

    Hi Philip,

    Yes, you attached the XSN correctly. Thank you.

    I guess I need to take a step back and gain a better understanding of the scenario. When I read "Render" I thought of the new command (RenderForm) included in qRules v4.3.

    I see your form is using qRules v4.3, but I don't see the RenderForm command in the Logic Inspector.

    I see SubmitToSharePointList in use with the AddAttachment option.

    SubmitToSharePointList /dsname=AddAttachment /submit=SharepointList /mapping=mapping /xpath=my:Deltakere_Deltakerbevis_Filvedlegg /uniqueName=no

    So the attachment being added to the list item is located at:

    /my:myFields/my:Kursdeltakere/my:group1/my:group2/my:Deltakere_Deltakerbevis_Filvedlegg

    So to troubleshoot I would do the following:

    1. Verify whether the SubmitToSharePointList command (without the AddAttachment option) works without issue, in creating the list items

    2. Test the command with the AddAttachment option and see whether this works or fails, and if it fails, check the Error node in the QdabraRules secondary data source.

    If this all works fine, then the issue is elsewhere (not the mapping).

    My pending doubt is: what do you mean by "I then render that particular view"? And does this file look fine before adding it as the attachment to the list item?

    In case you'd like to try the new command to render the view, you can read more in these blog posts:

    http://www.infopathdev.com/blogs/mark_tienzo/archive/2012/12/31/renderform-command.aspx

    http://www.infopathdev.com/blogs/mark_tienzo/archive/2013/01/30/renderform-with-savetosharepoint-command.aspx

    Hope this helps! Let me know whether I can assist any further. Thanks.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 02-07-2013 11:21 AM In reply to

    Re: Renderform - dissapearing images

    Thank you for answering :)

    Sorry for not being precise enough. I'll try to clarify.

    I am speaking about the RenderForm command that was added in qrules 4.3. I use it in an action-rule on the button labeled "Lag Sertifikat" on view = Deltaker. Strangely enough - the button doesn't appear in the rule inspector.

     When the button labeled "Lag sertifikat" is pushed the command Renderform is run for /view=Deltakerbevis. The Deltakerbevis.htm is then stored in /my:myFields/my:Kursdeltakere/my:group1/my:group2/my:Deltakere_Deltakerbevis_Filvedlegg. By this time I can see that the fileattachent control contains a file (Deltakerbevis.htm). Doubleclicking on it will show the diploma perfectly - Including pictures.

    The problem appears after i submit the attachment (htm-file) to the sharepointlist item. When opening a list element and then open the list attachment - all the pictures are gone...but the text remains. Mabye when rendering a view, the inserted jpeg pictures in that view aren't included in the output file (rendered.htm), and the rendered.htm file only contains relative references to the images. Hence if the htm file got moved, the references to the pictures will be all wrong....just a thought.

    Btw: Qrules have really opened up my eyes for what's possible to do in inopath. The development time has been decreased thanks to qrules. Now I don't have to reinvent the weel each time i want to do a thing that's not out of the box. Don't regret that I bought it. Thank you :)

     Philip

  • 02-08-2013 06:09 AM In reply to

    Re: Renderform - dissapearing images

    Hi Philip,

    I've been able to reproduce the exact issue. Now it's off to the development team to get a fix.

    Thanks for finding this! I'll update this forum thread when we have more info.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 02-08-2013 06:54 AM In reply to

    Re: Renderform - dissapearing images

    Thank you so much for taking interest in this case. Looking forward to se if a fix is possible to make. I'm not sure if it is, as I've dived deeper into the problem, and found out it might be close to impossible to make a fix.

    PS. In a perfect world this command should have an addition option for the "output" switch:

     

    RenderForm /views=Diploma /output=PDF /filename=Diploma.pdf   (How cool wouldn't that be :)  )

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.