--- lang: ja-jp breaks: true --- # SSRS リモートレポートのプレビュー画面よりExcel出力を行うと、「レポートの表示中にエラーが発生しました。(rrRenderingError)'MS.Utility.EventTrace'のタイプ初期化子が例外をスローしました。要求されたレジストリ アクセスは許可されていません。」とエラーが発生した。 2021-03-24 これまでに、様々な環境にSSRSを導入して使用しているが、このエラーをみるのは初めて。 Webポータルから同様の操作を行っても同じエラーが発生。 ※pdf出力、csv出力は正常に動作しているようだが、wordもダメ。 ![](https://i.imgur.com/SX0FyVV.png) ちまみに、クライアント側で同じ操作を行うと違うメッセージが出力された。 ![](https://i.imgur.com/IJa6dH0.png) 以下に同様のエラーの報告有り。 > reporting-services - SSRSレポート、EXCELにエクスポートするとrrRenderingErrorエラーが発生する-'MS.Utility.EventTrace'のタイプ初期化子が例外をスローしました https://cloud6.net/so/reporting-services/3806234 ### イベントログの内容 ```! Target event count: 1 Date and time: 2021年3月24日 18:31:58 Level: エラー Log name: Application Source: Report Server (SSRS) Event ID: 116 Task category: 3 Keyword: クラシック User: Machine: XX-XXXXX Ope code: 情報 Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: レポートの表示中にエラーが発生しました。 ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: レポートの表示中にエラーが発生しました。 ---> System.TypeInitializationException: 'MS.Utility.EventTrace' のタイプ初期化子が例外をスローしました。 ---> System.Security.SecurityException: 要求されたレジストリ アクセスは許可されていません。 -------------------------------------------------- ``` ### StackOverflowに解決策あり > SSRS reports, exporting to EXCEL gives rrRenderingError error - The type initializer for 'MS.Utility.EventTrace' threw an exception > > I had the same issue in SSRS 2019, and the fix was quite easy. > >In Report Server Configuration Manager > Service Account, I had it set to "Use built-in account" = "Virtual Service Account". > >I changed to "User another account", and selected a local users who is part of the Administrators group. > >NOTE: This is NOT the Execution Account. This is for the Service Account. https://stackoverflow.com/questions/45864808/ssrs-reports-exporting-to-excel-gives-rrrenderingerror-error-the-type-initial#answer-65047260 ![](https://i.imgur.com/Y5913mn.png) 「仮想サービスアカウント」をローカルアカウントに変更する。 ![](https://i.imgur.com/JYyQezz.png) 「仮想サービスアカウント」でも問題が発生しないことの方が多いので、発生した場合に変更することにする。 ###### tags: `SSRS` `エラー`