将页脚设置到位 [英] set the footer in place
问题描述
设置页脚.
在上面的屏幕中,在新成员报告和报告期之后显示页脚,但我不希望这样
in the above screen the footer is displayed after new member report and reporting period but i dont want like this
我正在使用C#开发Windows应用程序.
I'm working on windows application using C#.
我已经使用女士图表控件生成了报告".在打印并导出为XPS格式时,Header和Footer看起来不错. 但是我希望页脚当前显示在报表的底部,而该页脚正出现在标题之后,我想使用C#在底部添加此页脚.因此,用户可以使用页眉和页脚打印页面.怎么做.
I have generated the "Report" using Ms chart control. While printing and exporting into XPS format, Header and Footer are appearing its fine . But i want the Footer will be displayed at the bottom of the report at present it was appearing just after the header, I want to add this Footer at the bottom using C#. So user can print page with Header and Footer. How to do this.
任何人对此都有想法吗.
can any one have idea about this ..
非常感谢....
这是我的代码
Title maintitle = kpiChartControl.Titles.Add("New Members Report" + Environment.NewLine);
maintitle.Alignment = ContentAlignment.TopLeft;
maintitle.Font = new Font(FontFamily.GenericSansSerif, 11, FontStyle.Bold);
Title rangetitle = kpiChartControl.Titles.Add(string.Format("Report period from : {0} to {1}{2}", dStartDate.Value.ToString(xxx.dateFormat),
denddate.Value.ToString(xxxx.dateFormat), Environment.NewLine));
rangetitle.Alignment = ContentAlignment.TopLeft;
rangetitle.Font = new Font(FontFamily.GenericSansSerif, 11, FontStyle.Bold);
Title footertitle = kpiChartControl.Titles.Add("--------------------------------------------------------" + Environment.NewLine);
footertitle.Alignment = ContentAlignment.BottomCenter;
Title gompanytitle = kpiChartControl.Titles.Add("xxxx");
gompanytitle.Alignment = ContentAlignment.BottomLeft;
gompanytitle.Font = new Font(FontFamily.GenericSansSerif, 9, FontStyle.Regular);
Title printedby = kpiChartControl.Titles.Add(string.Format("Printed By ("+text+") On :{0}", dt,Environment.NewLine));
printedby.Alignment = ContentAlignment.BottomRight;
printedby.Font = new Font(FontFamily.GenericSansSerif, 9, FontStyle.Regular);
kpiChartControl.Printing.Print(true);
kpiChartControl.Titles.Remove(maintitle);
kpiChartControl.Titles.Remove(rangetitle);
kpiChartControl.Titles.Remove(footertitle);
kpiChartControl.Titles.Remove(gompanytitle);
kpiChartControl.Titles.Remove(printedby);
推荐答案
诀窍是使用Docking属性.因此,对于您希望放置在图表下方的所有项目,请执行以下操作
The trick is to use the Docking property. So for all items that you wish to place below the graph, do the following
printedby.Docking = Docking.Bottom;
gompanytitle.Docking = Docking.Bottom;
footertitle.Docking = Docking.Bottom;
这篇关于将页脚设置到位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!