Reputation: 101
I am modifying existing reports using Visual Studio 2022, I make changes NOT related to the style (colors, fonts etc.) The report is also deployed Visual Studio 2022.
Then I am publishing to an SSRS 2014 report server and the report executes correctly. We can export to PDF and CSV with no issues BUT When the report is run and exported to an .XLSX file I get the following pop-up from Excel:
"We found a problem with some content in 'file.xlsx' Do you want us to try to recover as much as we can?"
When I choose to fix the issue it seems to just remove the style completely and its just the data in the spreadsheet.
Allowing Excel to fix it results in this error:
error176520_01.xmlErrors were detected in file 'https://tcore-my.sharepoint.com/someFolder/Documents/the_report_name_here.xlsx'Removed Part: /xl/styles.xml part. (Styles)Repaired Records: Cell information from /xl/worksheets/sheet1.xml part
I tried removing different elements in the report and the one that seems to be causing the error is the Tablix, but the data is correct just not the formatting. Excel removes the "style"
Upvotes: 0
Views: 63
Reputation: 101
After Hannover Fist comment, I started removing images and then elements one at a time. The issue was involving the Tablix Font Family.
note: this is after pulling the RDL from SSRS 2014, and importing into VS 2019
In VS 2019, when you open a text field property from the tablix and go to "Font" there is nothing in the Font Family. By default it usually will use 'Arial' as the Font Family.
Switching to the Code view (View --> Code) and then searching for FontFamily we get all of the text fields set to "<FontFamily />"
So all of the text boxes are set to an Empty FontFamily.
The fix was to Find & Replace all of the "<FontFamily />"
With "<FontFamily>Arial</FontFamily>"
Then deployed back to SSRS 2014 and the Excel export worked fine.
Upvotes: 0