Using SQL Server Reporting Services (SSRS) in an ASP.NET MVC project

There are a handful of examples out on the internet on how to use SSRS from an ASP.NET website but all of the ones I came across seemed like hacks. They range from throwing an ASPX page with a ReportViewer control to complex JavaScript hacks. The following method is the one I have used for many years that adheres to the true MVC manner. This method connects to SSRS through the web service using Microsoft.Reporting.WebForms assembly.

Continue reading

MSI Web Setup Project Error: Unable to build project output group ‘Content Files from SOMEWEB (Active)’

I stumbled onto this error and thanks to Scott Hanselman’s blog I was able to find a solution to it.

The only problem? My project had a TON of files marked as Content (such as multiple versions of angular) and I didn’t want to spend all morning going through the countless folders to figure out which files were missing in order to resolve the conflict. If only Visual Studio has some way to verify this and let you know which files were missing…

Oh wait, it does! Its just buried and very difficult to find.

You can get visual studio to display all these “yellow icon” missing files by using the Publish Solution option. For those of you unfamiliar with the publish wizard, here is what I did:

  • Right Click your website project and click publish.
  • On the publish wizard that pops up, select Custom and type in any name for the profile.
  • For publish method, I selected File System and chose a directory to publish to.
  • Click the Publish button and it will error and show you exactly which files were missing. You may have to do this multiple times until you get all the missing files resolved.

GridView Column Grouping in ASP.NET

If you are writing code to show a large amount of records in an ASP.NET GridView control, you should do your best to make them easily readable since it can be overwhelming. I’ve ran across a few different hacks using JQuery to enhance the presentation of GridView records, but this seems to lag the user’s browser when a large number of rows is encountered. I have wrote a small function that performs this action server-side and rids the user of the content-rendering JQuery lag spike.

Continue reading