cancel
Showing results for 
Search instead for 
Did you mean: 

Context Menu and DrillDownSubreport Click event

Former Member
0 Kudos

I have developed my application using Crystal Reports 2008 and C#. My form embeds a Crystal ReportViewer for user to view our custom reports. We also include a popup context menu on the GUI but we experience problems with the built-in DrillDownSubreport behavior. When we launch (right click) the context menu on top of the report content page and click any of the menu item, the mouse click seems to trigger the DrillDownSubreport at the same time. I had tried to mask that but wasn't successful - e.g. using context menu popup and collapse event to set different DrillDownSubreport handler on setting the return value (true to disabled) as well as trying on the WndProc.

I would appreciate if someone can help me to resolve this issue so that my context menu will work without triggering the subreport drilldowns.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Have you tried to cancel drilldown on the Crystal Reports Viewer? Be aware, it will cancel all drilldown not just subreports.

CrystalReportViewer1.EnableDrillDown = False

'Set the viewer to the report object
CrystalReportViewer1.ReportSource = crReportDocument

Elaine

Former Member
0 Kudos

I had already explored that option before my original post. The key is that I need the drilldownsubreport capability when the context menu is not up.

I had tried already to disable drilldown when the context menu was popped up (popup event) and reanble the drilldown when the context menu was collapsed (collapsed event). The drilldown event was still sent to the report window together with my context menu click. It seems to the processing order on the hooked wndproc/prefilter imposed by Crystal Reports dictates this behavior.

Answers (0)