tgf-47
Member
- Joined
- Feb 16, 2010
- Messages
- 15
- Programming Experience
- Beginner
I have a problem.
Everything works perfectly, but on the drillthrough event. Say I clicked on the cell that contains the value of "Peter".
How can I get the clicked value of the report to a variable?
I need to put that value into a variable to use on other parts of my project.
Everything works perfectly, but on the drillthrough event. Say I clicked on the cell that contains the value of "Peter".
How can I get the clicked value of the report to a variable?
VB.NET:
Public Sub DemoDrillthroughEventHandler(ByVal sender As Object, _
ByVal e As DrillthroughEventArgs) Handles ReportViewer1.Drillthrough
Dim localReport As LocalReport = e.Report
'gets the name of the repots that is loaded into the reportviewer so that
'the wrong data wont get loaded
If ReportViewer1.LocalReport.ReportEmbeddedResource = "Reports.rptAccount.rdlc" Then
localReport = e.Report
'"NewDb_orders" ---> DatabaseName_TableName
localReport.DataSources.Add(New ReportDataSource( _
"Ds_InvoiceAcc", InvoiceByACC()))
ElseIf ReportViewer1.LocalReport.ReportEmbeddedResource = "Reports.rptDetails.rdlc" Then
localReport = e.Report
localReport.DataSources.Add(New ReportDataSource( _
"NewDb_listings", Listings()))
End If
End Sub
I need to put that value into a variable to use on other parts of my project.