开发者

Is there a built-in way to convert System.Drawing.Color to a ReportColor?

开发者 https://www.devze.com 2023-02-11 18:08 出处:网络
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 Report

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消