Showing posts with label supplied. Show all posts
Showing posts with label supplied. Show all posts

Friday, February 24, 2012

Local Drillthrough Report 'Data source Instance has not been supplied'

I've searched and searched and can't find how to do this.
I've got a main report and a report that I am trying to use the 'Jump
to' ability with. I am capturing the ReportViewer1.DrillThrough event
and am doing this:
ReportViewer1.LocalReport.DataSources.Add(New
ReportDataSource("JobApplications_ApplicantDetails",
LoadApplicantDetailsData()))
I have set this report as the 'main' report that runs in the viewer
when it first loads and it works correctly but just not when 'jumped
to'. I have removed all parameters that need to be passed to the
report so there is nothing missing there.
This is the actual error I recieve:
A data source instance has not been supplied for the data source
'JobApplications_ApplicantDetails'.
Any help is greatly appreciated.
ThanksDo you still have these problems by viewing a new report in the same
reportviewer control after you activate a "jump to report" in the original
report (Me too...)
I will try to experiment more with it this evening.
Do somebody already have an answer
--
Regards
dagha
"hurst.andy@.gmail.com" wrote:
> I've searched and searched and can't find how to do this.
> I've got a main report and a report that I am trying to use the 'Jump
> to' ability with. I am capturing the ReportViewer1.DrillThrough event
> and am doing this:
> ReportViewer1.LocalReport.DataSources.Add(New
> ReportDataSource("JobApplications_ApplicantDetails",
> LoadApplicantDetailsData()))
> I have set this report as the 'main' report that runs in the viewer
> when it first loads and it works correctly but just not when 'jumped
> to'. I have removed all parameters that need to be passed to the
> report so there is nothing missing there.
> This is the actual error I recieve:
> A data source instance has not been supplied for the data source
> 'JobApplications_ApplicantDetails'.
> Any help is greatly appreciated.
> Thanks
>|||Hi I am getting the following error message when using drillthrough and
jump to another report in the same reportviewer.
Error message:
A Datasource instance has not been supplied for the data source
'DataSetProductDetail_ShowProductByProductID'
--
MyCode:
Protected Sub DemoDrillthroughEventHandler(ByVal sender As Object,
ByVal e As DrillthroughEventArgs) Handles ReportViewer1.Drillthrough
Dim drillthroughReport As LocalReport = CType(e.Report, LocalReport)
Dim MydataSet As DataSet = New DataSet()
Dim thisConnection As SqlConnection = New
SqlConnection(ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString)
Dim myCommandDataAdapter As SqlDataAdapter = New
SqlDataAdapter("DataSetProductDetail_ShowProductByProductID",
thisConnection)
myCommandDataAdapter.SelectCommand.CommandType =CommandType.StoredProcedure
myCommandDataAdapter.SelectCommand.CommandText ="ShowProductByProductID"
myCommandDataAdapter.SelectCommand.Parameters.Add(New
SqlParameter("@.ProductID", 2))
myCommandDataAdapter.Fill(MydataSet,
"DataSetProductDetail_ShowProductByProductID")
'Associate thisDataSet(now loaded with the stored procedure
result)
'with the ReportViewer datasource
Dim datasource1 As ReportDataSource = New
ReportDataSource("DataSetProductDetail_ShowProductByProductID",
Mydataset.Tables(0))
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(datasource1)
ReportViewer1.LocalReport.Refresh()
End Sub
--
Any ideas?
dagha wrote:
> Do you still have these problems by viewing a new report in the same
> reportviewer control after you activate a "jump to report" in the original
> report (Me too...)
> I will try to experiment more with it this evening.
> Do somebody already have an answer
> --
> Regards
> dagha
>
> "hurst.andy@.gmail.com" wrote:
> > I've searched and searched and can't find how to do this.
> >
> > I've got a main report and a report that I am trying to use the 'Jump
> > to' ability with. I am capturing the ReportViewer1.DrillThrough event
> > and am doing this:
> >
> > ReportViewer1.LocalReport.DataSources.Add(New
> > ReportDataSource("JobApplications_ApplicantDetails",
> > LoadApplicantDetailsData()))
> >
> > I have set this report as the 'main' report that runs in the viewer
> > when it first loads and it works correctly but just not when 'jumped
> > to'. I have removed all parameters that need to be passed to the
> > report so there is nothing missing there.
> >
> > This is the actual error I recieve:
> > A data source instance has not been supplied for the data source
> > 'JobApplications_ApplicantDetails'.
> >
> > Any help is greatly appreciated.
> > Thanks
> >
> >