2017-03-02 59 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”控制使用脚本自定义字符串的输出格式,你可以用下面的更换你的脚本代码:

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

*其中“ReportInfo1”是你ReportInfo控件的名称

相关问题