作成日: 2015/10/13 最終更新日: 2015/10/13
文書種別
不具合
状況
回避方法あり
詳細
SectionのOnFormatプロパティ内でReplaceなどのVBScript関数を使用しているレポート定義ファイルをC1Reportで読み込むと、VBScriptが実行されません。
なお、この現象は「Reports for WPF」のみで発生しています。
なお、この現象は「Reports for WPF」のみで発生しています。
回避方法
C1ReportのPrintSectionイベント等を使用し、レポート定義ファイルに記載されたReplaceなどのVBScript関数の処理内容をVisual BasicまたはC#のコード上に記述します。
◎サンプルコード(Visual Basic)
◎サンプルコード(C#)
◎サンプルコード(Visual Basic)
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
Dim rpt As C1Report = New C1Report()
rpt.Load("Report.xml", "新規レポート")
AddHandler rpt.PrintSection, AddressOf rpt_PrintSection
rpt.Render()
End Sub
Private Sub rpt_PrintSection(sender As Object, e As ReportEventArgs)
' レポート定義ファイルに記載されたReplaceなどのVBScript関数の処理内容
End Sub
Dim rpt As C1Report = New C1Report()
rpt.Load("Report.xml", "新規レポート")
AddHandler rpt.PrintSection, AddressOf rpt_PrintSection
rpt.Render()
End Sub
Private Sub rpt_PrintSection(sender As Object, e As ReportEventArgs)
' レポート定義ファイルに記載されたReplaceなどのVBScript関数の処理内容
End Sub
◎サンプルコード(C#)
private void Window_Loaded(object sender, RoutedEventArgs e)
{
C1Report rpt = new C1Report();
rpt.Load("Report.xml", "新規レポート");
rpt.PrintSection += new ReportEventHandler(rpt_PrintSection);
rpt.Render();
}
void rpt_PrintSection(object sender, ReportEventArgs e)
{
// レポート定義ファイルに記載されたReplaceなどのVBScript関数の処理内容
}
{
C1Report rpt = new C1Report();
rpt.Load("Report.xml", "新規レポート");
rpt.PrintSection += new ReportEventHandler(rpt_PrintSection);
rpt.Render();
}
void rpt_PrintSection(object sender, ReportEventArgs e)
{
// レポート定義ファイルに記載されたReplaceなどのVBScript関数の処理内容
}
旧文書番号
81468