Is there a built-in way to convert System.Drawing.Color to a ReportColor?
Reporting services seems to use a ReportColor object for setting different colours on a repor开发者_高级运维t. There doesn't seem to be an obvious way of converting a System.Drawing.Color to a ReportColor, or have I missed something?
I think a ReportColor is just a string (not sure how you're using it), so just use .ToString() on your System.Drawing.Color object. ToString returns a human-readable color name (e.g. "Teal", "SlateGray" etc.) that will probably in most cases be a string that matches what ReportColor is expecting.
精彩评论