For my current client I am so fortunate to be able to work on Sharepoint 2013 solutions.
I thought it might be useful to create a blog post about the problems I encountered.
First I was asked to create a simple application with a nested list structure (Expense Report has Expense Lines). Link
Following this I was asked to create a report based on list data of the previous structure. I soon found that creating reports requires the Business Intelligence Center feature on the SharePoint server, however only the SharePoint 2013 Enterprise Edition supports this. Link
Which caused them to look at InfoPath to make it more userfriendly. The end users who will be using the site won’t have Ms Office installed, so InfoPath Forms should be opened in the Browser. This requires the InfoPath Forms Services feature on the Sharepoint Server, however only the Enterprise (again) Edition supports this.
Which version of SharePoint 2013 do I have?
Turns out I have the Foundation Server edition installed.
So no Reports (BIC) or InfoPath Forms (in browser) possible.
Switched to a Enterprise Server, and now creating the forms the client asks.
Publishing InfoPath to Sharepoint Form Library is pretty straight forward.
Not sure how to make a dynamic table in a InfoPath Form, for the Expense Notes under an Expense Report.
Solved it with a simple repeating table, which I added with summary row. Tutorial here
I also wanted to display my Print Preview by clicking a button on the InfoPath form. This meant trying some Visual Studio code on the button.
This turned out not to work. Security issues.
I deleted my code in VS manually. Tried publishing my latest version and got an error.
The form template cannot be published to the server. Sandboxed solutions are not enabled on the Sharepoint Server farm. To continue, contact a site collection or farm administrator or publish the form template as an administrator-approved form template.
Turns out removing your VSTO code from an InfoPath form is hard. I had to close my unsaved form to get out from under this. If you did save, you could try resetting the button action to Submit To SP. Googling I found solutions for InfoPath 2007 & 2010. But not 2013. Link
Next I needed to have a print version of the document the user just finished. This because I want to hide the Submit button and Save info from the print view and the print view needs to contain Sign Here boxes.
I did this by adding a new view (PrintView) in InfoPath Designer, and on the original View, I went to Page Design, View, Properties
Print Settings => Designate print view ->PrintView
Next I had to hide certain items from the toolbar view, in order to make it simpler.
InfoPath Designer 2013 -> File -> Advanced form options -> Show the … commands.
They also wanted to let the user create Expense Reports but after submit no longer edit them. So I made a Submit Rule, where the form switches to the readonly Print View after submit.
Note that you have to change the submit options to allow the form to stay open after submit, otherwise this won’t do much. Submit Options, advanced, After Submit: Leave the form open.
After this I created a Form Load Action allowing me to show a different view if a required field has been filled. This show the Report in Print View after opened from the webpart. No changes after submit ! Link
And this is what it ended up looking like