I have come accross a construct in Crystal Reports for .NET that I don't know how to translate from C# to .NET.
This is the C# statement:
reportDocument.PrintOptions.PaperSource = (CrystalDecisions.Shared.PaperSource)paperSourceRaw;
paperSourceRaw is an integer.
The funny thing is that CrystalDecisions.Shared.PaperSource has a number of data members that do not match paperSourceRaw yet it works.
I think this has to do with a special data member called "value_".
The statement works fine in C# and I must make it work in OpenEdge.
Can anyone shed some light on this?
Try something similar to this here:
RETURN CAST (System.Enum:ToObject (Progress.Util.TypeHelper:GetType ("System.Windows.Forms.Shortcut":U),
Where iEnum is your integer value and System.Widnows.Forms.Shortcut will be replaced with your enum type.
Brilliant! This works!
(Or at least I don't get a compile or runtime error. Functionally it still does not work )