Edward Joell
asked on
The report definition for report 'RptXXX' has not been specified.
I put this thread in the Visual Studio Reporting control forum and in the ASP.Net Forum and no one replied. So in desperation I am putting it here. Hopefully, I can get a knowlegeable person to reply.
I am trying to build a report viewer in an ASP.net page. I am using Reportviewer 11.0.0.0 in a VS 2010 project in VS 2012.
I did the following:
However, the first run of the report gave me an error reporting:
However this resulted in the error:
So I commented out this code and I tried clicking "rebind datasource" several times then running the app. I now got the error,
It seems like this should be so simple yet I've been working on this one 8 line web page for a day and a half and have still not been able to show a report in the report viewer.
I have viewed a lot of information on the web but most everyone says to fix this issue, put it in the code which throws the error above.
I have not seen anyone address the issue of the empty datasource box in the choose datasource or explain why you set the datasource in the report if it is not used.
I am trying to build a report viewer in an ASP.net page. I am using Reportviewer 11.0.0.0 in a VS 2010 project in VS 2012.
I did the following:
1.
I copied an RDL file from an SSRS report into the project with the extension changed to rdlc.2.
I created a datatable in a dataset file using the SQL used in the original SSRS report.3.
I opened the report in the report designer and changed the datasource and the dataset to those created in the project in step 24.
After several hours, I was finally able to get the report viewer's smarttag to open and I was able to set the report in the smarttag. The report has the reference to the dataset saved in it. So I guess that is why the "Choose Datasource" box showed up empty. As did the datasource instances.However, the first run of the report gave me an error reporting:
A data source instance has not been supplied for the data source
So I tried to do it in the page_load by doing the below.this.rvCodCost.ProcessingMode = ProcessingMode.Local;
this.rvCodCost.LocalReport.ReportPath = "Reports/DodIC_Expiration_Report.rdlc";
ReportDataSource rds = new ReportDataSource("ReportDataSet", ReportDataSet.DataTable1DataTable);
this.rvCodCost.LocalReport.DataSources.Add(rds);
However this resulted in the error:
The call is ambiguous between the following methods or properties:
'Microsoft.Reporting.WebForms.ReportDataSource.ReportDataSource(string, System.Collections.IEnumerable)'
and 'Microsoft.Reporting.WebForms.ReportDataSource.ReportDataSource(string, System.Data.DataTable)'
So I commented out this code and I tried clicking "rebind datasource" several times then running the app. I now got the error,
"The report definition for report 'RptXXX' has not been specified."
It seems like this should be so simple yet I've been working on this one 8 line web page for a day and a half and have still not been able to show a report in the report viewer.
I have viewed a lot of information on the web but most everyone says to fix this issue, put it in the code which throws the error above.
I have not seen anyone address the issue of the empty datasource box in the choose datasource or explain why you set the datasource in the report if it is not used.
ASKER
Consider this comment deleted. Entered as reply into wrong forum. Still waiting for an answer.
ASKER
I changed the code in the Page_Load to that below but it returned the same exact error message:
this.rvCodCost.ProcessingMode = ProcessingMode.Local;
this.rvCodCost.LocalReport.ReportEmbeddedResource = "TestWebReport.Reports.DoDIC_Expiration_Report.rdlc";
//this.rvCodCost.LocalReport.ReportPath = "Reports/DodIC_Expiration_Report.rdlc";
DataSet dsFile = new DataSet();
dsFile = new ReportDataSet();
DataTable dtFile = dsFile.Tables[0];
ReportDataSource rds = new ReportDataSource(); //dtFile.TableName,dtFile);
rds.Name = "TestReportDataSource";
rds.Value = dsFile.Tables[0];
this.rvCodCost.LocalReport.DataSources.Clear();
this.rvCodCost.LocalReport.DataSources.Add(rds);
this.rvCodCost.LocalReport.Refresh();
ASKER
I changed the code for the rds name to be exactly the same as the dataset in the report so the code looks like this.
Update:
The view source of the page reveals a hidden error message
rds.Name = "Dataset1";
rds.Value = (DataTable)dsFile.Tables[0];
This got rid of the error message. However no report is rendered.Update:
The view source of the page reveals a hidden error message
<h2>However, upon review of the web.config, this contention is completely false.
Report Viewer Configuration Error
</h2><p>The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebC ontrol.axd " type = "Microsoft.Reporting. WebForms.H ttpHandler , Microsoft.ReportViewer.Web Forms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd808 0cc91" ; /> to the system.web/httpHandlers section of the web.config file, or add <add name="ReportViewerWeb ControlHan dler" preCondition="integra tedMode&qu ot; verb="*" path="Reserved.Report ViewerWebC ontrol.axd " type="Microsoft.Repor ting.WebFo rms.HttpHa ndler, Microsoft.ReportViewer.Web Forms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd808 0cc91" ; /> to the system.webServer/handlers section for Internet Information Services 7 or later.</p>
>However, upon review of the web.config, this contention is completely false.
You mean you have the handler registered in web.config? Can you show us that section? Does it show in list if you double click on Handler Mappings in IIS manager?
http://stackoverflow.com/questions/5623695/reportviewer-10-0-on-iis-7-5-not-rendering
http://forums.asp.net/t/1360494.aspx/1
You mean you have the handler registered in web.config? Can you show us that section? Does it show in list if you double click on Handler Mappings in IIS manager?
http://stackoverflow.com/questions/5623695/reportviewer-10-0-on-iis-7-5-not-rendering
http://forums.asp.net/t/1360494.aspx/1
because your code is in the Page_Load event, add your code inside a "if (!IsPostBack)" statement
ASKER
@emoreau
Already tried that this morning based on a forum entry I found on the web. Unfortunately it made no difference.
@CodeCruiser
I am still in development. This machine is a Navy Machine so it can not have IIS installed on it. So I am working with the Visual Studio 2012 development built-in webserver. I am not familiar with how to add http handlers to that. The httphandler and the handler are added in the web.config of the project. See below
Already tried that this morning based on a forum entry I found on the web. Unfortunately it made no difference.
if (!IsPostBack)
{
this.rvCodCost.ProcessingMode = ProcessingMode.Local;
//this.rvCodCost.LocalReport.ReportEmbeddedResource = "TestWebReport.Reports.DoDIC_Expiration_Report.rdlc";
this.rvCodCost.LocalReport.ReportPath = "Reports/DodIC_Expiration_Report.rdlc";
DataSet dsFile = new DataSet();
dsFile = new ReportDataSet();
DataTable dtFile = dsFile.Tables[0];
ReportDataSource rds = new ReportDataSource(); //"ReportDataSet", (DataTable)ReportDataSet.DataTable1DataTable);
rds.Name = "Dataset1";
rds.Value = (DataTable)dsFile.Tables[0];
this.rvCodCost.LocalReport.DataSources.Clear();
this.rvCodCost.LocalReport.DataSources.Add(rds);
this.rvCodCost.LocalReport.Refresh();
}
@CodeCruiser
I am still in development. This machine is a Navy Machine so it can not have IIS installed on it. So I am working with the Visual Studio 2012 development built-in webserver. I am not familiar with how to add http handlers to that. The httphandler and the handler are added in the web.config of the project. See below
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
and <handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
Is there somewhere else they need to be?
ASKER
My meeting at which I have to report my findings on using this tool is in 45 minutes and as off now I will have to report that the organization's expert in SSRS could not get the report viewer to work. Nor could any other experts.
Since we can't view SSRS reports, rather than spend any more money on this, we will probably end up building an Html page then copying it to pdf using itextsharp and printing the report from there.
Update: I've been given a repreive to determine whether the required report structure can be generated using SSRS. If so, we will re-examine the report viewer then.
Since we can't view SSRS reports, rather than spend any more money on this, we will probably end up building an Html page then copying it to pdf using itextsharp and printing the report from there.
Update: I've been given a repreive to determine whether the required report structure can be generated using SSRS. If so, we will re-examine the report viewer then.
I have done further digging and only two suggestions I have based on my research are
1) If you can get IIS, try hosting the site there and then test
2) If you have VS2010, try and use that.
Do you have the report viewer assembly in GAC?
1) If you can get IIS, try hosting the site there and then test
2) If you have VS2010, try and use that.
Do you have the report viewer assembly in GAC?
ASKER
So out of frustration due to lack of assistance I started again from scratch. Brand new project, dropped and dragged report viewer on to page, generated dataset in code added tables[0] Ran the report in debug and this time got error
Unhandled exception at line 167, column 5 in http://localhost:63208/Default.aspx
0x800a1391 - Microsoft JScript runtime error: 'Microsoft' is undefinedWhat does this mean???
Update: Then at this link http://www.visualwebgui.com/Developers/Forums/tabid/364/forumid/56/threadid/53545/scope/posts/Default.aspx
I found that someone had to add the handlers into the web.config manually when they got this error. I did so. And the new report project rendered the same invisible httphandler error as the other web page.
MORE Update: ¿
The report definition file was copied over from an rdl that was converted to an rdlc using the process spelled out in MSDN. The schema definition in the report was
http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition
When I changed it to read 2012 then project refused to compile throwing error
The report definition is not valid or supported by this version of Reporting Services. This could be the result of publishing a report definition of a later version of Reporting Services, or that the report definition contains XML that is not well-formed or the XML is not valid based on the Report Definition schema. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2012/01/reportdefinition' which cannot be upgraded.Any ideas?
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Unhandled exception at line 167, column 5 in http://localhost:63208/Default.aspx
0x800a1391 - Microsoft JScript runtime error: 'Microsoft' is undefinedWhat does this mean???
Update: Then at this link http://www.visualwebgui.com/Developers/Forums/tabid/364/forumid/56/threadid/53545/scope/posts/Default.aspx
I found that someone had to add the handlers into the web.config manually when they got this error. I did so. And the new report project rendered the same invisible httphandler error as the other web page.
MORE Update: ¿
The report definition file was copied over from an rdl that was converted to an rdlc using the process spelled out in MSDN. The schema definition in the report was
http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition
When I changed it to read 2012 then project refused to compile throwing error
The report definition is not valid or supported by this version of Reporting Services. This could be the result of publishing a report definition of a later version of Reporting Services, or that the report definition contains XML that is not well-formed or the XML is not valid based on the Report Definition schema. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2012/01/reportdefinition' which cannot be upgraded.Any ideas?
--------------------------
@Netminder
Try calling @ValentinoV and @mlmcc who may be able to assist.
Try calling @ValentinoV and @mlmcc who may be able to assist.
ASKER
Soooo. Another MS error messge that has nothing to do with the error.
Working with MS support we found that the issue had nothing to do with httphandlers. The rdlc file which was converted from an rdl file using instructions found here; http://msdn.microsoft.com/en-us/library/ms252109(VS.80).aspx ; was the source of the porblem. When a brand new rdlc file was added to the project and a simple text box was added, and the report path changed to show this simple rdlc, the the reportviewer worked fine. MS Support is now working with the project to determine what the problem with the converted rdlc file is. In case anyone here can determine what the problem with the report file is I am uploading it for examination. I had to change the extension of the rdlc to txt since Experts-Exchange will not upload rdlc files. As a reminder, I am using VS 2012 with reportviewer version 11.0.0.0 in a Framework 4.0 project.
DoDIC-Expiration-Report.txt
Working with MS support we found that the issue had nothing to do with httphandlers. The rdlc file which was converted from an rdl file using instructions found here; http://msdn.microsoft.com/en-us/library/ms252109(VS.80).aspx ; was the source of the porblem. When a brand new rdlc file was added to the project and a simple text box was added, and the report path changed to show this simple rdlc, the the reportviewer worked fine. MS Support is now working with the project to determine what the problem with the converted rdlc file is. In case anyone here can determine what the problem with the report file is I am uploading it for examination. I had to change the extension of the rdlc to txt since Experts-Exchange will not upload rdlc files. As a reminder, I am using VS 2012 with reportviewer version 11.0.0.0 in a Framework 4.0 project.
DoDIC-Expiration-Report.txt
ASKER
Microsoft Support person stated that the schemas used by SSRS RDL
I find it rather illogical that this should be the case.
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
]do not comply with the schemas required by RLDC for MS Reportviewer.
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
The MS person stated that there was no possible means by which the XML in the RDL file could be modified to meet the requirements of the 2008/01/reportdefinition schema.I find it rather illogical that this should be the case.
Good work on your part but unfortunately, it appears that you may have to redesign the report in rdlc.
ASKER
Two things.
First off: I built a copy of a report being used in SSRs using the tools in VS 2012. (3 hours work!)
Then I tried to run it.
Lo and behold I got the same httphandler error. This is with a report created using the tools as designed.
So I found the original rdl in. It was in a BIDS project that was originally created in SSRS 2008. I found that the rdl in that was using the 2008/01 schema. So I loaded it into notepad++ loaded the copy of it into notepad++ and did a compare. For all of the import parts, the schema was the exactly the same.
First off: I built a copy of a report being used in SSRs using the tools in VS 2012. (3 hours work!)
Then I tried to run it.
Lo and behold I got the same httphandler error. This is with a report created using the tools as designed.
So I found the original rdl in. It was in a BIDS project that was originally created in SSRS 2008. I found that the rdl in that was using the 2008/01 schema. So I loaded it into notepad++ loaded the copy of it into notepad++ and did a compare. For all of the import parts, the schema was the exactly the same.
Hi Joeller,
I'm one of the experts that got notified by Netminder. However, unfortunately my experience with RDLCs is not sufficient to be of much use here.
Hopefully another expert will be able to help you out!
As for schema, this is the schema used when I build a SSRS 2012 (SP1) report using VS 2010 (SP1):
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
All the best,
Valentino.
I'm one of the experts that got notified by Netminder. However, unfortunately my experience with RDLCs is not sufficient to be of much use here.
Hopefully another expert will be able to help you out!
As for schema, this is the schema used when I build a SSRS 2012 (SP1) report using VS 2010 (SP1):
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
All the best,
Valentino.
ASKER
Hi ValentinoV. That schema was the one that was used when I downloaded the RDL from SSRS2008R2. That was what I was using with the orginal report.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Because I was the one who solved the issue, because no one else was able to.
ASKER
Open in new window
The error message return upon building and running in debug is(Dataset1 is the name of the Dataset of the report)