Thursday, May 26, 2011

Formatting RDL/RDLC values as percentage

I thought I'd share how to format percentage values in ReportViewer report.
Say your data source has the following fields:
  • TotalLow
  • TotalHigh
  • Total

Suppose we want to display the values for TotalLow and TotalHigh as  percentage of Total.

We can use the following expressions.
=String.Format("{0:p0}",Sum(Fields!TotalLow.Value)/Sum(Fields!Total.Value))
=String.Format("{0:p0}",Sum(Fields!TotalHigh.Value)/Sum(Fields!Total.Value))

You notice the RDL/C allows you to use .NET String object Format method.

Hope this helps.

Thursday, May 12, 2011

SQL Service fails to start with error code 126

Got this tweet notification:
 
myitforum

Friday, May 06, 2011

Coding Standards, why the heck?

Coding standards. Yes. Coding standards. Why do we need them?

I was reviewing our companies coding style document and thought I share with you some references I have come across.

The essence of enforcing coding standards is to have coding style - which is good for management of your code base and consistency. And overall, improves productivity of your developers.

Here are some useful links on coding style:

Brad Abrams Internal coding style
MSDN: Design Guidelines for Developing Class Libraries
Google C++ Style Guide