Problem I’m building a report using ReportViewer. I’m setting the Data Source to a collection of model objects. One of the fields on the model is an enum. When the report renders, it is showing the enum’s numeric value. I want it to show the string representation of the enum instead. Solution In the field … Read more ReportViewer RDLC – How to show an enum’s string representation
Problem I am building a report using ReportViewer RDLC and I’m trying to bind the data. When I try to add my BindingList to the BindingSource I get the following exception: System.InvalidOperationException: “Objects added to a BindingSource’s list must all be of the same type.” Here’s the code causing this: Solution Set the BindingSource.DataSource to … Read more System.InvalidOperationException: Objects added to a BindingSource’s list must all be of the same type.
Problem You’re trying to use the ReportViewer control in Visual Studio but it’s not in the toolbox. Other symptoms: After manually adding the ReportViewer control to the toolbox clicking Design a new report does nothing. The RDLC report designer does not open and opening the RDLC file just opens the report markup. Solution Note: I … Read more ReportViewer doesn’t appear in the toolbox in Visual Studio
Problem When entering the sa password while installing SQL Server you get the following error: “The specified sa password does not meet strong password requirements.“ Solution If the computer is on a domain Go to Administrative Tools / Domain Security Policy :: Security Settings | Account Policies | Password Policy Set “Minimum password length” = Not … Read more The specified sa password does not meet strong password requirements
Problem I am parsing CSV data and a string field contains commas. For example: The split string for the 3rd line will produce the array: The solution is to merge the slots that belong to the string field. In the example above, you would merge indexes 0 and 1. Code Tests
I had to parse a list of comma-separated HTTP Response Codes from the app.config file and use them to retry HTTP POST requests if the response code was contained in that list. This article explains how to parse a list of comma-separated values from the app.config and put them into a HashSet so it can … Read more How to parse a comma-separated string from app.config