Archive for June, 2010

If you have a entity with a nested entity, you can show the nested entity’s properties with a little trick.

For example if you have these business objects:

public class MyObj
    public MyOtherObj MyProperty { get; set; }

public class MyOtherObj
     public int SomeProperty { get; set; }

If you want to show a field from MyProperty (e.g. MyOtherObj.SomeProperty), and MyObj is your report’s datasource, your report fieldbox will need to look like this:


(NOTE: do not add “.Value” onto the end of the property name as normal, it will produce a #error at runtime).

Shows X-checked box or empty box in your RDLC report and displays correctly when exported to PDF (change the textbox’s font to Wingdings2):

=IIf( Fields!MyBooleanField.Value, Chr(83), Chr(163))

How to motivate your team without really trying (or paying a penny in bonuses)

There is a great deal of evidence that for inventive/creative tasks (such as most kinds of software development), extrinsic rewards (such as bonuses) do not work as primary motivators.   In fact, if used without any intrinsic motivations, extrinsic rewards will actually decrease performance over both the short term and long term.  Dan Pink and others assert that engineers and other creative types instead value autonomy, mastery, and purpose above all else in their jobs.

Here’s an outstanding whiteboard animation where Dan Pink neatly explains the science behind intrinsic vs. extrinsic motivation:


Here’s a great video of Dan Pink speaking at TED last year where he explains the hard-core science more fully:


His book, Drive: The Surprising Truth About What Motivates Us, explains the principles still further and drills down into the how’s, why’s, and gotcha’s discovered over the last several decades of research.

How to show report data in RDLC Page Header

You may have noticed that the compiler will bomb if you try to add a field directly to an RDLC’s Page Header. However, you can display field values in the Page Header like this:

1. Add the field column to the table (for a report) or a field box (for a form) with a value like this “=First(Fields!CtrName.Value)”.

2. Set the field box properties to CanShrink = true, CanGrow = false, Visibility-Hidden=true.

a. Warning: Don’t set the whole table column to Visibility-Hidden=true, for some reason the data won’t appear in the Page Header, you have to set the column header, footer, and textbox separately.

3. Add a textbox to the Page Header with the value of the textbox on your report/form body with a value like this: “=First(ReportItems!CtrName.Value)”

4. Shrink the width of the column or field to its smallest value.

© 2017 Robert Corvus