ActiveReport 中的页码
现在,我正在 ASP.net 和 C# 中使用 ActiveReport。我想知道我可以在“部分事件”中获取页码吗?我想在页码不等于1时显示一些数据。因此,我想在Detail_Format事件中获取页码。我可以吗?
private void detail_Format(object sender, EventArgs e)
{
int pageNumber = 0;
//getting page number
if(pageNumber == 1)
{
//do some function
}
else
{
//show some data
}
}
所以,我需要知道当前页码。请帮我。
谨致问候。
Now, I am working with ActiveReport in ASP.net and C#. I would like to know that can I get page number in "Section Event". I want to show some data when the page number is not equal to 1. So , I want to get page number in Detail_Format Event. Can I?
private void detail_Format(object sender, EventArgs e)
{
int pageNumber = 0;
//getting page number
if(pageNumber == 1)
{
//do some function
}
else
{
//show some data
}
}
So, I need to know current page number. Please help me.
With Regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
页码是当前运行报表的属性。但是,当在 Detail_Format 事件中使用它时,您应该知道,如果某个部分在一个页面上格式化,然后由于适合而需要移动到另一页,则它可能不准确。在BeforePrint 事件中使用PageNumber 的更准确的地方。
PageNumber is a property of the current running report. However, when using it in Detail_Format event you should know that it might not be accurate in cases where a section is formatted on one page then needs to be moved to another page because of fitting. The more accurate place to use PageNumber in the BeforePrint event.