app.UseReporting(settings =>
{
settings.UseCustomStore(r =>
{
PageReport pageReport = new PageReport();
pageReport.Load(new FileInfo(Path.Combine(Directory.GetCurrentDirectory(), "resources" + Path.DirectorySeparatorChar + HttpUtility.UrlDecode(r))));
GrapeCity.ActiveReports.PageReportModel.TextBox tb=new GrapeCity.ActiveReports.PageReportModel.TextBox();
tb.Value = ExpressionInfo.Parse("底部文字");
tb.Width= new GrapeCity.ActiveReports.PageReportModel.Length(3, Length.Unit.Centimeters);
tb.Height= new GrapeCity.ActiveReports.PageReportModel.Length(2, Length.Unit.Centimeters);
tb.Left = new GrapeCity.ActiveReports.PageReportModel.Length(5, Length.Unit.Centimeters);
tb.Top = new GrapeCity.ActiveReports.PageReportModel.Length(0, Length.Unit.Centimeters);
if (pageReport.Report.PageFooter==null)
pageReport.Report.PageFooter=new GrapeCity.ActiveReports.PageReportModel.PageHeaderFooter();
pageReport.Report.PageFooter.Height=new GrapeCity.ActiveReports.PageReportModel.Length(3, Length.Unit.Centimeters);
pageReport.Report.PageFooter.ReportItems.Add(tb);
pageReport.Report.PageFooter.PrintOnFirstPage=true;
pageReport.Report.PageFooter.PrintOnLastPage=true;
return pageReport.Report;
});
settings.UseCompression = true;
});
|