none
Problem with Drillthrough RRS feed

  • Question

  • Hello,
     
    I am trying to develop a Drillthrough-Report in an ASP.NET WebForms-Project. For this I have given Action to cells
    of a Report. (Jump to report xy)
    The report I will jump to is very simple. An image and some text. But when I click on a Drillthroug-Text in my first
    report, an empty page is opened (only the controls are available... "export as" and so on).
    I have also inserted an DrillThroughEvent in my Project:

    Private Sub Get_New_Report_Viewer()  
            Try 
                Dim coll As ControlCollection  
                coll = rptViewer.Parent.Controls  
                Dim oldIndex As Integer = coll.IndexOf(rptViewer)  
     
                _tmp_repviewer = rptViewer  
     
                coll.Remove(rptViewer)  
     
                rptViewer = New ReportViewer  
                rptViewer.ProcessingMode = ProcessingMode.Local  
                rptViewer.LocalReport.EnableExternalImages = _tmp_repviewer.LocalReport.EnableExternalImages  
                rptViewer.LocalReport.EnableHyperlinks = _tmp_repviewer.LocalReport.EnableHyperlinks  
                rptViewer.Visible = _tmp_repviewer.Visible  
                rptViewer.ShowBackButton = _tmp_repviewer.ShowBackButton  
                rptViewer.ShowExportControls = _tmp_repviewer.ShowExportControls  
                rptViewer.ShowFindControls = _tmp_repviewer.ShowFindControls  
                rptViewer.ShowParameterPrompts = _tmp_repviewer.ShowParameterPrompts  
                rptViewer.ShowPrintButton = _tmp_repviewer.ShowPrintButton  
                rptViewer.ShowReportBody = _tmp_repviewer.ShowReportBody  
                rptViewer.SizeToReportContent = _tmp_repviewer.SizeToReportContent  
                rptViewer.ShowToolBar = _tmp_repviewer.ShowToolBar  
                rptViewer.ShowZoomControl = _tmp_repviewer.ShowZoomControl  
                rptViewer.ShowDocumentMapButton = _tmp_repviewer.ShowDocumentMapButton  
                rptViewer.SizeToReportContent = _tmp_repviewer.SizeToReportContent  
                rptViewer.Height = _tmp_repviewer.Height  
                rptViewer.Width = _tmp_repviewer.Width  
                rptViewer.BackColor = _tmp_repviewer.BackColor  
                rptViewer.BorderColor = _tmp_repviewer.BorderColor  
                rptViewer.DocumentMapCollapsed = _tmp_repviewer.DocumentMapCollapsed  
                rptViewer.ZoomMode = _tmp_repviewer.ZoomMode  
                rptViewer.DocumentMapWidth = 175  
     
                coll.AddAt(oldIndex, rptViewer)  
     
                rptViewer.LocalReport.DataSources.Clear()  
     
                'Add a handler for drillthrough.  
                AddHandler _tmp_repviewer.Drillthrough, AddressOf DrillthroughEventHandler  
            Catch ex As System.Exception  
                RadAjaxManager1.Alert(ex.Message.ToString)  
            End Try 
        End Sub 
          
        Public Sub DrillthroughEventHandler(ByVal sender As ObjectByVal e As DrillthroughEventArgs)  
            Dim localReport = e.Report  
     
        End Sub 

    But when I set a BreakPoint in the EventHandler, the point is never reached...

    Can anybody help me?

    Regards John
    Tuesday, July 8, 2008 8:50 AM

All replies

  • Hi John,
    You may have to do a DirectCast in your drillthrough Sub.  For example:

    ' "Cast" the Report passed in Arg e as a LocalReport named localReport.

    Dim localReport As Microsoft.Reporting.WebForms.LocalReport = DirectCast(e.Report, Microsoft.Reporting.WebForms.LocalReport)


    I'm not sure that you can just "Dim" your variable to equal e.report and expect it to inherit the datatype.  Just a guess.  Try it and see.

    Keith


    Still green with Visual Studio development.
    Wednesday, July 9, 2008 2:37 PM