|
|
#1 |
|
Lively Member
Join Date: Feb 10
Location: CapeTown, South Africa -34.01244,18.337415
Posts: 115
![]() |
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? Code:
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
|
|
|
|
|
|
#2 |
|
Lively Member
Join Date: Feb 10
Location: CapeTown, South Africa -34.01244,18.337415
Posts: 115
![]() |
Re: Microsoft ReportViewer Problem. Please help
I got it to work using drillthrough into other reports and then passing the value I needed into variables to use for other functions.
Here is the code, just in case somebody else is having the same problem: vb Code:
|
|
|
|
![]() |
| Tags |
| reports, vb 2008 |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|