Since last week I was looking forward on how to deal with custom reports on Nintex. And it's very nice, the way they developed it gives the users some great capabilities on querying workflow information. This post shows the necessary steps to create a custom report using the data already available on Nintex Workflows. I also suggest a previous reading on the SDK document, available here:
Nintex have it own database separated from SharePoint. The developers are capable of creating new tables, stored procedures and what else is necessary to improve the workflow customizing. On the Reporting case, we can create Stored Procedures to handle our custom queries. This How to create a query which looks for how many tasks the users handled. It's quite simple, but is a good way to check how reporting works.
1. First of all, let's create the XML file of our Report. All the information about the elements of the XML can be found on the SDK PDF, which I linked before. Bellow is the full XML. Save it in your hard drive, we will use it later.
2. After creating the XML file, we need to create a new stored procedure to handle it in the Nintex Datababase, on the SQL Server. It's quite simple, with one input parameter - @Username - which is used to filter the query.
3. Now that the Stored Procedure and the XML used as interface are created, when can create a new Report on the SharePoint Central Administration. Go to Application Management > Nintex Workflow Management > Manage Reports. And click on Add New Report.
4. On the new screen, type the name of the new report, an optional description, and the role if you want to restrict the access, and the XML file, which we created before. After filling the information, click Ok.
5. It's necessary to restart the IIS for the server, in order to make the report available in the SharePoint. It's important to notice that this reset is only necessary when a new report is added; if we just change information on an existing Report (including the XML) it's not necessary to restart it.
6. Ok! Now our report is available! Yes, but only for Administration Reports. To check it working, go to SharePoint Central Administration > Application Management > Nintex Workflow Management > Administration Reports. The reports that appear here have the Scope property defined as Farm. You will notice that the filter by user is available and properly working.
7. And how to let the report available on my site collections? It's also simple. You need to give Execute permission on the database Stored procedure to the user of the SharePoint Application Pool. By default, this user is WSS_Content_Application_Pools, but maybe it was changed in your installation. To give the user permission, go to the SQL Management Studio, right click on the Stored Procedure, permissions, search this user and give him Execute permission.
8. Now the report is also available on the sites of the site collections! You can add Nintex Web parts to consume it! Have fun!