none
The report definition for report 'RptXXX' has not been specified. 2nd Attempt.

    Question

  • 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 in the SQL Server Data Mining forum (since that is what it is all about.)  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:

    1. I copied an RDL file from and 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 2
    4. 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 all day and have still not been able to show a report in the report viewer.

    I have view 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.


    Edward R. Joell MCSD MCDBA


    • Edited by joeller Monday, August 12, 2013 3:15 PM spelling
    Monday, August 12, 2013 2:32 PM

Answers

  • 

    It gets stranger. I took the report we created during the MS trouble call which displayed just fine, and added a dataset and some parameters.

    Bam!!! HTTPhandler error! I took out the parameters and every thing displayed just fine except that there were no results because no parameter was applied. There is an issue with how the parameters are being read.

    AND it had nothing to do with the version of the schema!!! I used the 2010/01 schema it it behaved the same way!!! No parameters, view is fine, but no data. Add parameters HTTPHander error.

    Update:

    On this page http://www.gotreportviewer.com/ in the FAQs it says about parameters in reportviewer

    Q: Why doesn't the ReportViewer control support parameter prompting in local mode? A: The ReportViewer control does not prompt for parameters when in local mode. It prompts for parameters when it is connected to a Report Server.

    In local mode it does not make sense for ReportViewer to prompt for parameters. The rationale is as follows: The most common use of report parameters is to pass to queries as values of query parameters. But unlike the Report Server, the ReportViewer control does not execute queries itself. Rather, queries are executed by the host application, and the result is passed to the ReportViewer control. So the ReportViewer control does not have the opportunity to set query parameters. Applications should take advantage of the parameterization features of Visual Studio data wizards instead.

    So I built a report with no parameters. I built a dropdown in the report viewer page to provide a parameter for the query. I used a data adapter to assign a data table to the dataset, and assigned parameter to the command setting the value equal to the selected value of the dropdown. I opened the report and got my results. This was in a report converted from an rdl to an rdlc. I had to go into the xml and remove the query parameters and the query SQL, under the datasources element.


    Edward R. Joell MCSD MCDBA



    • Marked as answer by joeller Wednesday, September 04, 2013 6:02 PM
    • Edited by joeller Wednesday, September 04, 2013 6:11 PM More info
    Wednesday, September 04, 2013 1:49 PM

All replies

  • I removed the "<localReport> tags from the rvCog_Cost control and I uncommented and modified my code in the Page_Load to the below;

                this.rvCodCost.ProcessingMode = ProcessingMode.Local;
                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);
                this.rvCodCost.LocalReport.DataSources.Add(rds);

    The error message return upon building and running in debug is

    A data source instance has not been supplied for the data source 'DataSet1'.

    (Dataset1 is the name of the Dataset of the report)


    Edward R. Joell MCSD MCDBA


    • Edited by joeller Monday, August 12, 2013 8:12 PM
    Monday, August 12, 2013 3:52 PM
  • I changed the code again to set the RDS.Name = "DataSet1";

                rds.Name = "Dataset1";
                rds.Value = (DataTable)dsFile.Tables[0];

    This resulted in page loading with no error messages in the report viewer.  But nothing else on the page showing up either.

    

    Update: The view source of the page reveals a hidden error message

    <h2>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 &lt;add verb="*" path="Reserved.ReportViewerWebControl.axd"

    type = "Microsoft.Reporting.WebForms.HttpHandler,

    Microsoft.ReportViewer.WebForms, Version=11.0.0.0,

    Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&gt; to the

    system.web/httpHandlers section of the web.config file,

    or add &lt;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" /&gt;

    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. Both references are in there. Don't know why this does not show on the page.


    Edward R. Joell MCSD MCDBA


    • Edited by joeller Tuesday, August 13, 2013 9:28 PM
    Tuesday, August 13, 2013 8:58 PM
  • 

    In less than 20 hours I have to report to our development group on whether the Microsoft Report Viewer can be used to replace a third party control. Based on my experience so far, I would have to report "No. It is not possible to get the thing to work properly."


    Edward R. Joell MCSD MCDBA

    Wednesday, August 14, 2013 4:34 PM
  • My meeting 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.

    Update:

    The decision of the customer is to continue to investigate the usage of the report viewer while investigating building the report in html.  So If anyone has anyideas about this invisible httphandler error i would like to hear them. 


    Edward R. Joell MCSD MCDBA



    • Marked as answer by joeller Monday, August 19, 2013 6:23 PM
    • Unmarked as answer by joeller Tuesday, August 20, 2013 1:12 PM
    • Edited by joeller Tuesday, August 20, 2013 1:17 PM
    Monday, August 19, 2013 6:23 PM
  • I submitted an MS support ticket.  Working with the report we found that the error had nothing to do with the http handler.  It was due to the fact the schema used by the RDLCs that ReportViewer 11.0.0.0 could read were

    xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"

    xmlns:rd=http://schemas.microsoft.com/SQLServer/reporting/reportdesigner

    But the schemas used by SSRS RDL

    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"

    which do not comply with the schemas required by RLDC for MS Reportviewer. The MS person stated that there was no possible means by which the XML in the RDL file could be manually modified to meet the requirements of the 2008/01/reportdefinition schema.

    I find it rather illogical that this should be the case.

    So I am going to attempt to find out how to modify the schema of the RDL to meet the criteria required by ReportViewer 11.0.0.0.


    Edward R. Joell MCSD MCDBA


    • Edited by joeller Friday, August 30, 2013 2:54 PM
    Friday, August 30, 2013 2:50 PM
  • 

    It gets stranger. I took the report we created during the MS trouble call which displayed just fine, and added a dataset and some parameters.

    Bam!!! HTTPhandler error! I took out the parameters and every thing displayed just fine except that there were no results because no parameter was applied. There is an issue with how the parameters are being read.

    AND it had nothing to do with the version of the schema!!! I used the 2010/01 schema it it behaved the same way!!! No parameters, view is fine, but no data. Add parameters HTTPHander error.

    Update:

    On this page http://www.gotreportviewer.com/ in the FAQs it says about parameters in reportviewer

    Q: Why doesn't the ReportViewer control support parameter prompting in local mode? A: The ReportViewer control does not prompt for parameters when in local mode. It prompts for parameters when it is connected to a Report Server.

    In local mode it does not make sense for ReportViewer to prompt for parameters. The rationale is as follows: The most common use of report parameters is to pass to queries as values of query parameters. But unlike the Report Server, the ReportViewer control does not execute queries itself. Rather, queries are executed by the host application, and the result is passed to the ReportViewer control. So the ReportViewer control does not have the opportunity to set query parameters. Applications should take advantage of the parameterization features of Visual Studio data wizards instead.

    So I built a report with no parameters. I built a dropdown in the report viewer page to provide a parameter for the query. I used a data adapter to assign a data table to the dataset, and assigned parameter to the command setting the value equal to the selected value of the dropdown. I opened the report and got my results. This was in a report converted from an rdl to an rdlc. I had to go into the xml and remove the query parameters and the query SQL, under the datasources element.


    Edward R. Joell MCSD MCDBA



    • Marked as answer by joeller Wednesday, September 04, 2013 6:02 PM
    • Edited by joeller Wednesday, September 04, 2013 6:11 PM More info
    Wednesday, September 04, 2013 1:49 PM