开发者

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

开发者 https://www.devze.com 2023-02-05 00:46 出处:网络
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 ma

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

精彩评论

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

关注公众号