2017-03-02 16 views
0

私はこのアクティブなレポートのReportInfoフィールドにちょうど時間値を追加しますか?

using GrapeCity.ActiveReports; 
public string OutputFormat {get; set;} 
public void PageHeader_Format() 
{ 
this.ReportInfoTime.OutputFormat = "hh:mm tt"; 
this.ReportInfoTime.Value = System.DateTime.Today; 
} 

のようなスクリプトセクションのレポートのための時間を追加しようとしている。しかし、私はこのエラー

'GrapeCity.ActiveReports.SectionReportModel.ReportInfo' does not contain a definition for 'OutputFormat' and no extension method 'OutputFormat' accepting a first argument of type 'GrapeCity.ActiveReports.SectionReportModel.ReportInfo' could be found (are you missing a using directive or an assembly reference?) 

にどんなアドバイスを取得しています。

答えて

1

スクリプトを使用してカスタム文字列に「ReportInfo」コントロールの出力形式を変更するために、次を使用してスクリプトコードを置き換えることがあります。「ReportInfo1は」あなたのReportInfoコントロールの名前です

public void PageHeader_Format() 
{ 
    this.ReportInfo1.FormatString = "{RunDateTime:hh:mm tt}"; 
} 

*を

関連する問題