作成日: 2024/11/25 最終更新日: 2025/11/12
文書種別
不具合
状況
修正済み
詳細
Linux環境で埋め込みリソースからレポートファイルを読み込んだ場合、JSONデータソースの接続で以下のエラーが発生します。
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'baseUri')
回避方法
SP2 (18.2.0.0) で修正済み
※以前の回避方法
ResourceLocator.BaseUriからバックスラッシュを除去してください。
// 埋め込みリソースからレポートファイルを読み込む
var thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
var stream = thisAssembly.GetManifestResourceStream("ConsoleApp1.SectionReport1.rpx");
var xtr = new System.Xml.XmlTextReader(stream);
var rpt = new SectionReport();
rpt.LoadLayout(xtr);
// バックスラッシュを除去
var path_linux = rpt.ResourceLocator.BaseUri.ToString().Replace("\\", "");
rpt.ResourceLocator.BaseUri = new Uri(path_linux);