StrataFrame Forum

How do I get an enum value in Custom BO?

http://forum.strataframe.net/Topic22685.aspx

By Michael Reese - 4/8/2009

How do I get an enumeration into my Custom BO.

We took the plunge and purchased Sharp-Shooter. We are now utilizing Crystal and SS which replaced ActiveReports. Great move! Now I am trying to display an Enumeration value in the Custom Report BO?

How do do that?

Thanks Much

Example

Enumerations.PhoneType

Michael

Patient.Enumerations.PhoneType

By Trent L. Taylor - 4/9/2009

Are you just wanting to show the text representation of the enumeration on the report?  I assume that is what you are getting at.  In this case, if you are tagging each enum item with the MicroFour.StrataFrame.Tools.EnumDisplayValue("MyValue") (which I recommend) then you can call the following code:

MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(MyBO.MyEnumField)

In a report scenario, it would most likely be easiest to create a custom property to expose this.  Let me know if this isn't what you were getting at.

By Michael Reese - 4/9/2009

Thanks Trent,

I also found an excellent example in the Flix Application. I should have gone there before posting this.

Michael