views:

255

answers:

1

Hi,

I have a local report in a WinForms application that is giving me some trouble. On this report, I have a table and I am trying to change the BackgroundColor of the Detail row.

When I change it to "Red" and view the report, the row is Red as hoped for. When I export the report to Excel and PDF, the row is Red, too. So far, so good...

If, however, I change the row color to something like "DarkSeaGreen," it will display in my ReportViewer control ok and the PDF looks good, too, but the copy I exported to Excel just shows this row as gray.

I have tried out a few different colors... some work, some don't. I have also tried setting this property different Hex values; again, some work, some don't.

Has anyone experience this before? What is causing the colors to turn to gray when the report is exported to Excel?

Any assistance is greatly appreciated!

Edit: Also, the same colors that don't display in Excel don't print from the ReportViewer either... looks like Excel isn't the main culprit.

A: 

Have you tried using a hexidecimal value for your colour and see'ing if Excel picks it up. My guess is that Excel doesn't support the CSS colour naming codes.

Select your row, table, text box etc and set the colour to something like #2f4fa2 - see if that works in Excel.

Chalkey
Yes, I have tried setting the color to a hex value... that doesn't work, either.
Robert