开发者

From the Crystal Reports Navigate event using the page number, can you get the reportobjects on that page

I have a Main report that contains a number of subreports. When I navigate in the main report from one page to another, I have access to "NavigateEventArgs e" which gives me the Page number in the main report. Given this page n开发者_C百科umber, I would like to know which subreport is displayed on this page.

Has anyone any suggestions for obtaining this?

Thanks,

Paul


I figured out the answer myself and it is something like this for anyone else interested:

private void CRViewer_Navigate(object source, CrystalDecisions.Windows.Forms.NavigateEventArgs e) {

MessageBox.Show(((source as CrystalDecisions.Windows.Forms.PageView).GetActiveDocument().GetPage(e.NewPageNumber).SectionInstances[1].ReportObjectInstances[0].ObjectName.ToString()));

}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜