我正在尝试为脚本部分的报告添加时间,如下所示
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?)任何建议。
发布于 2017-03-03 12:52:18
要使用脚本将"ReportInfo“控件的输出格式更改为自定义字符串,您可以将脚本代码替换为以下内容:
public void PageHeader_Format()
{
this.ReportInfo1.FormatString = "{RunDateTime:hh:mm tt}";
}*其中"ReportInfo1“是ReportInfo控件的名称
https://stackoverflow.com/questions/42558906
复制相似问题