Last post Feb 15, 2013 01:48 AM by mhlove
Feb 14, 2013 11:30 AM|mhlove|LINK
There is not a lot of help available on this topic, so I hope someone with a lot of knowledge on the topic can help.
This is what I have so far. I am trying to do a simple Drilldown. The main report opens, I click the column that I have set for the jump to report and that all works as it should, I can even see the value that is passed as the parameter. Again up to this
point all is well. Once the page goes to the detail or jump-to report I get an empty report as in no data. The column headers are their but nothing else. I am using RSSDataset.xsd as data source. The dataset contains "MainDataTableAdapter" and "DetailDataTableAdapter"
the details has a param named @ACCT_ID that is passed from the main report. This is the same param name that i used in the Jump-to or detail report. I also set the text property of a label to show the param value... If some one has a simular working version
that would be a big help. Thanks to all!!
Rdlc files are named MainReport.rdlc and DetailReport.rdlc
This was from a sample by "Selva" on Blogs.msdn.com/b/selvar/archive/2010/03/03... Dynamically passing parameter to DrillThrough report in RDLC-Part 1. I altered it to fit my needs...
Protected Sub ReportViewer1_Drillthrough(ByVal sender As Object, ByVal e As Microsoft.Reporting.WebForms.DrillthroughEventArgs) Handles ReportViewer1.Drillthrough
Dim val As Integer = 0
Dim Report As LocalReport = DirectCast(e.Report, LocalReport)
Dim List As IList(Of ReportParameter) = Report.OriginalParametersToDrillthrough
For Each param As ReportParameter In List
val = Convert.ToInt32(param.Values(0))
Dim conn As New SqlConnection(cnstr)
Dim ds As New RSSDataset
lblerror.Text = val.ToString
Dim Adap As New SqlDataAdapter("SELECT ACCT_ID, CONVERT(Char(10), START_DT, 101) AS START, CONVERT(Char(10), LAST_PMT_DT, 101) AS [END], PP_STATUS FROM RSS.Pay_Plan_Test WHERE CAST(ACCT_ID AS BIGINT)=" & Trim(Val), conn)
Report.DataSources.Add(New ReportDataSource("RSSDataset_DetailData", ds.DetailData))
Catch ex As Exception
lblerror.Text = ex.Message
Feb 15, 2013 01:48 AM|mhlove|LINK