Skip to Content
author's profile photo Former Member
Former Member

Context Menu and DrillDownSubreport Click event

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:15 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.