Sunday, November 6, 2011

Sharepoint Access Services Reporting Flexibility

I have been struggling with offering my users a flexible and powerful reporting environment in their Access Services application. In a desktop MS Access database, to give users the ability to select more than one item to apply to a single filtering criteria you can either create a custom interface/fuction with VBA or use a multi-select combobox (or listbox) with VBA. Unfortunately, VBA is not available in Access Services. Microsoft has replaced VBA with expanded Macro capabilities that, while pretty powerful, is not as flexible or powerful as VBA. Nor is a multi-select combobox available in the same way in a web database. I had to think outside the box.

Here's what I came up with:

In our database we have a table with contacts and a related table with lists that the contacts belong to. I created a list lookup table with the values the users can select to filter their records with the fields: SelectList(s) (Y/N), Lists, ListID. There are 55 possible lists in the lookup table. Then I designed a report selection form, placed a subform on it with checkboxes for each list selection. After selecting the list(s) the user desires and clicking "Select Lists" a macro is run that populates TempVars with the for selected list(s) ListID number.

I designed a Query that links the Contacts table to an interim ContactLists table that then links to the SelectMultiLists table. I run a datamacro that sets the selected records to YES for the TempVars ListID. I included the SelectList field in the query and set it's criteria to "True" so that only the related records that the user has checked in the subform appear in the results.

Back on the Report Selection form, after the user clicks the yes/no option to select their criteria, they select the report (I have 4 different report formats including labels and a spreadsheet layout appropriate for export to Excel) they want to run and a macro is run with additional If/Else/Endif structure that additionally filters the report selected.

In this way I was able to offer reports on multiple lists and have included 3 additional criteria (state, district, active).

I reviewed the templates Microsoft offers for Web Databases, and the Northwinds Web template and I believe what I have designed has more flexibility/options for reporting all in Sharepoint (don't have to move to the client).

Would love to hear your feedback if you have worked with Access Services and can offer better or additional reporting suggestions.

Sunday, September 25, 2011

My First Access Services Project

Access Services is Microsoft's answer to running MS Access applications on the web, in Sharepoint. The obvious advantage is that a user with login credentials can access their data from any web browser. I have completed and published my first MS Access Services project. It has been tested on an iphone/ipad and it runs just like on a PC (not quite as much fun on an iphone because of the screen size but great to have the option in a pinch). I don't know about you but I can think of lots of business needs that this might fill. Microsoft Access is the most widely used desktop database system in the world. Sharepoint is the perfect intranet environment and adding Access Services extends that usefulness.

Challenges that had to be overcome:

1) Office 2010 was the first release of Access Services so finding a lot of good examples and forum support is a challenge. A Google search on any MS Access features or questions returns beaucoup of resources - such is not yet the case with Access Services. Microsoft recommends http://www.utteraccess.com/forum/Access-Services-Web-Data-f74.html and I have found others like http://accessexperts.net/blog/category/access-web-database, http://channel9.msdn.com and http://dmoffat.wordpress.com. Though there are many that try to offer support, most prefice their comments with "I haven't tried this yet, but ..." It's a start, we are all learning and any effort these non-paid folks make to help should definately be appreciated. I've found posts by Albert Kallal are very comprehensive and informative.

2) I heard a lot of buzz about the fact that you must either have Sharepoint hosted in house of pay for the hosting service. Some complained that it was too expensive. In my opinion, this is not an issue. Any serious business application on the web must be securely hosted somewhere and Sharepoint offers that security and flexibility at a reasonable price for businesses. For $49/month accesshosting.com offers 5 users and handles our needs. That is not concurrent users, concurrent users aren't limited. That 5 users is user logins. So I configured administrator, contributor and viewer users with 3 user logins to spare. Accesshosting includes a daily backup in the hosting price but will only restore back one day. This is not an adequate backup/restore flexibility for most businesses but you can upgrade backup/restore options or plan your own backup.

2) Optimizing the design for speed. As we are running this in a web browser with multiple and varied internet speeds, making it as efficient as possible is important to it being a useable tool. My project contained about 14,000 records in the largest table and initially was too slow to load. The solution was to open the main page with a subset of the data (A-C for example) and offer the user a box to search for the record(s) they want and then query the next small subset of data. Doing this in all forms made a huge different in speed.

3) Offering multiple report formats and filtering options. I have 10 reports including formatted labels, each report/label has 3 or more filtering options. I host with Accesshosting.com and they include SQL Reporting Services in the hosting. In this way, my users are able to generate their reports and print or export in multiple formats including PDF, Excel, CSV and more. Does the trick.

I'm excited about the results and looking for my next project!