I have an odd error when incorporating a new SSRS report into my .net application. This report was created by a different developer, who used a different dataset name. I switched back to my other dataset name, the one I use successfully in all of the other
reports, however when I try to do a ServerReport.SetParameters command on that new report I get the invalid dataset error below. It even previews in VS just fine.
Any idea what's wrong here?
"Additional information: The report server cannot process the report or shared dataset.
The shared data source 'CDIPMonitoring' for the report server or SharePoint site is not valid.
Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)"
it starts out with APR_Master as the .rdl, and depending on input criteria, switches to APR_Master_mult as the .rdl, the new report. Both use the same dataset but only APR_Master_mult has the error, as it it the new .rdl. You're right, it sounds like an
access issue, however I have it using Windows Authentication and they preview just fine in VS so I'm puzzled.
################
case "Master APR Report":
MyReportViewer.ServerReport.ReportPath = "/HospitalInsightDotNetRSReports/CDIPMonitoring/APR_Master";
reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[4];
reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter("provider", Session["strSelectedHospital"].ToString());
reportParameterCollection[1] = new Microsoft.Reporting.WebForms.ReportParameter("payerid", Session["payerID"].ToString());
reportParameterCollection[2] = new Microsoft.Reporting.WebForms.ReportParameter("pid", Session["periodID"].ToString());
if (strPercentile == "4")
MyReportViewer.ServerReport.ReportPath = "/HospitalInsightDotNetRSReports/CDIPMonitoring/APR_Master_mult";
else
reportParameterCollection[3] = new Microsoft.Reporting.WebForms.ReportParameter("percid", strPercentile);
actually my problem was, since these are new reports, I had to set the data source in the report server manager in addition to VS and the code, which I had neglected to do. working now. Thanks!
Member
1 Points
6 Posts
dataset error
Feb 28, 2017 03:03 PM|scottl2001|LINK
Hello -
I have an odd error when incorporating a new SSRS report into my .net application. This report was created by a different developer, who used a different dataset name. I switched back to my other dataset name, the one I use successfully in all of the other reports, however when I try to do a ServerReport.SetParameters command on that new report I get the invalid dataset error below. It even previews in VS just fine.
Any idea what's wrong here?
"Additional information: The report server cannot process the report or shared dataset.
The shared data source 'CDIPMonitoring' for the report server or SharePoint site is not valid.
Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)"
Contributor
2155 Points
2142 Posts
Re: dataset error
Feb 28, 2017 03:34 PM|march11|LINK
Can you post some of the code?
this error...
Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)"
Looks like some sort of user access issue. Are you sure you can access the data source?
Member
1 Points
6 Posts
Re: dataset error
Feb 28, 2017 03:47 PM|scottl2001|LINK
sure - here's the code segment
it starts out with APR_Master as the .rdl, and depending on input criteria, switches to APR_Master_mult as the .rdl, the new report. Both use the same dataset but only APR_Master_mult has the error, as it it the new .rdl. You're right, it sounds like an access issue, however I have it using Windows Authentication and they preview just fine in VS so I'm puzzled.
################
case "Master APR Report":
MyReportViewer.ServerReport.ReportPath = "/HospitalInsightDotNetRSReports/CDIPMonitoring/APR_Master";
reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[4];
reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter("provider", Session["strSelectedHospital"].ToString());
reportParameterCollection[1] = new Microsoft.Reporting.WebForms.ReportParameter("payerid", Session["payerID"].ToString());
reportParameterCollection[2] = new Microsoft.Reporting.WebForms.ReportParameter("pid", Session["periodID"].ToString());
if (strPercentile == "4")
MyReportViewer.ServerReport.ReportPath = "/HospitalInsightDotNetRSReports/CDIPMonitoring/APR_Master_mult";
else
reportParameterCollection[3] = new Microsoft.Reporting.WebForms.ReportParameter("percid", strPercentile);
MyReportViewer.ServerReport.SetParameters(reportParameterCollection);
break;
################
Contributor
2155 Points
2142 Posts
Re: dataset error
Mar 01, 2017 05:12 PM|march11|LINK
Are you pointing to the same datasource from VS as you are when you publish the code? It sounds like you have different data sources.
Member
1 Points
6 Posts
Re: dataset error
Mar 01, 2017 05:42 PM|scottl2001|LINK
actually my problem was, since these are new reports, I had to set the data source in the report server manager in addition to VS and the code, which I had neglected to do. working now. Thanks!
Contributor
2155 Points
2142 Posts
Re: dataset error
Mar 01, 2017 09:32 PM|march11|LINK
I believe that is exactly what I was suggesting and point you to.
How about an answer vote. You can pick more than one.