Matt
Matt

Reputation: 835

SSRS Report Colours change when exporting to excel

When we export an SSRS 2008 report to excel and then copy a range from that file to another excel file, the colours used in the report are changed to something that is totally different, very annoying when we use 'Conditonal Formatting' to colour some of these cells a specific colour. Any ideas why?

Upvotes: 7

Views: 5319

Answers (4)

Anthony
Anthony

Reputation: 1

This Worked for me.

=IIF(sum(Fields!TotalHours.Value) <> "", "White","Pink") 

in other words make sure you define the colors for both conditions. Then on the Tablix1 Properties page under the Background fill color remove the "Automatic" and choose No color

Upvotes: 0

user3867873
user3867873

Reputation: 47

If you need only to copy and paste it from one file to another, you cant just ctrl+C and ctrl+P. Ctrl+C works fine, but because of something, you need to right click and in Paste options you need to roll down Paste special and find Keep source formating button. It works for me because it keeps all colours and formating except size of cells.

Upvotes: 0

sammy.NET
sammy.NET

Reputation: 11

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=386055

Suggestion from the SSRS team (in the above link/post) Posted by Microsoft on 5/29/2011 at 3:34 PM The API for COM/.NET is similar. You're calling Worksheet.Copy, which does not provide these options. Take a look at Range.Copy and Range.PasteSpecial.

Anyone having link to any C# code for using Range.Copy or PasteSpecial calls to copy from one workbook/sheet to another workbook?

I suppose the KeepSourceFormat or KeepSOurceScheme would be the trick to copy the sheet from one workbook to another to avoid the dis-color issue in SSRS 2008 R2 Excel report.

Upvotes: 1

Dennis G
Dennis G

Reputation: 21798

It is because MS started using Excel's custom color palette with SQL Server 2008 instead of the built-in colors. Problem is exactly as you are describing that when copy & pasting colors from one sheet to another you lose the formatting. Unfortunately: No way around that.

See this post: Excel Export copy to another excel discoloration issue for SSRS 2008

Upvotes: 3

Related Questions