locked
Convert RDL to RDLC file to run locally. RRS feed

  • Question

  • User-721056941 posted

    I have read through Microsoft Guides for conversion.

    http://msdn.microsoft.com/en-us/library/ms252109(v=vs.80).aspx

    I have no clue what manually replace the data source and query information in the report definition with data constructs provided in the application. I create a report sample one from VS then copy datasource and query information over the RDL. Also I rename RDL to RDLC extension and use it to run locally with reportviewer. I keep having this error:

    Error 1 The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition' which cannot be upgraded. C:\inetpub\wwwroot\ReportsWebsite\Original RDL.rdlc 1 

    Please provide me a details step of which to replace.

    Thank you in advance

    Andy

    Wednesday, October 24, 2012 2:26 PM

Answers

  • User765438783 posted

    Ok, I understand now, I tried that in the past but I could not do it.

    I recommend you to check your code in the following 4 places, I am just throwing out some thing which may or may not be the fix, but it might help. 

    1) Page Markup:
    <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

    Web.config:

    2) Compilation section:

    <buildProviders>

    <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    </buildProviders>

    3) In the assemblies section:

    <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    4) httphandlers section

    <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    validate="false"/>

    Good luck.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 25, 2012 9:41 AM

All replies

  • User765438783 posted

    Hi Andy,

    Hope this helps you:

    Markup:

     <asp:ScriptManager ID="ScriptManager1" runat="server">
     </asp:ScriptManager>
     <rsweb:ReportViewer ID="rptVrBurnDown" runat="server" Font-Names="Verdana" 
        Font-Size="8pt" Height="770px" Width="1100px" 
        ToolBarItemBorderStyle="Double">
        <localreport reportpath="D:\WebServer\CompletePath\rptBurnDownList.rdlc">
        </localreport>
     </rsweb:ReportViewer>

    Codebehind:

    protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // Get the User report criteria from the Query string
                // Parameters for my stored procedure
                string pgm = Request["pgm"];
                string pri = Request["pri"];
                string type = Request["type"];
    
                // define objects
                DataSet dsCActions;
                ReportDataSource dsSource;
                LocalReport lr;
    
                // Report Viewer settings
                rptVrBurnDown.Visible = true;
                rptVrBurnDown.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
                lr = rptVrBurnDown.LocalReport;
    
                dsCActions = SomeClassName.GetNewBurnDownList(pgm, pri, type);
                DataTable dt = dsCActions.Tables[0];
    
                dsSource = new Microsoft.Reporting.WebForms.ReportDataSource();
                dsSource.Name = "datasetname_storeprocedureName";
                dsSource.Value = dsCActions.Tables[0];
                lr.DataSources.Add(dsSource);
                lr.Refresh();
            }
        }

    Please let me know if you have any issues.

    Thank you!

    Wednesday, October 24, 2012 3:44 PM
  • User-721056941 posted

    Hi Krishna,

    Thank you for quick respond but that is not what I have problem with.

    The Code behind is not what I worry about. I created rdlc file in Visual Studio and able to populate like what you have above.  I am able to run report fine.

    I use microsoft report builder to create RDL file, how can I convert it to RDLC file. I rename from RDL TO RDLC and the error I have below. I updates some of the dataset name in the RDL file that on the microsoft link mention but it still doesn't work.

    Error 1 The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition' which cannot be upgraded. C:\inetpub\wwwroot\ReportsWebsite\Original RDL.rdlc 1 

     

     

    Wednesday, October 24, 2012 4:04 PM
  • User765438783 posted

    Ok, I understand now, I tried that in the past but I could not do it.

    I recommend you to check your code in the following 4 places, I am just throwing out some thing which may or may not be the fix, but it might help. 

    1) Page Markup:
    <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

    Web.config:

    2) Compilation section:

    <buildProviders>

    <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    </buildProviders>

    3) In the assemblies section:

    <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    4) httphandlers section

    <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    validate="false"/>

    Good luck.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 25, 2012 9:41 AM
  • User-1842880510 posted
    Did all of that (for version 11.0.0.0 rather than 9.0.0.0 since I am working in VS 2012), Kept getting an ReportViewer HTTPHandler Error with a style of display:none&quot; An MS support call and I identified the issue as being the supposedly converted RDL file. It was showing in the schemas line &lt;Report xmlns:rd=&quot;http://schemas.microsoft.com/SQLServer/reporting/reportdesigner&quot; xmlns:cl=&quot;http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition&quot; xmlns=&quot;http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition&quot;&gt; That line for an rdlc created in vS 2012 was &lt;Report xmlns=&quot;http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition&quot; xmlns:rd=&quot;http://schemas.microsoft.com/SQLServer/reporting/reportdesigner&quot;&gt; Tried changing the converted RDL line to xmlns:rd=&quot;http://schemas.microsoft.com/SQLServer/reporting/reportdesigner&quot; xmlns:cl=&quot;http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition&quot; xmlns=&quot;http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition&quot;&gt; and I got compile error of &quot;The report definition is not valid or supported by this version of Reporting Services.&quot; I changed it to xmlns:rd=&quot;http://schemas.microsoft.com/SQLServer/reporting/reportdesigner&quot; xmlns:cl=&quot;http://schemas.microsoft.com/sqlserver/reporting/2008/01/componentdefinition&quot; xmlns=&quot;http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition&quot; Same error. I removed the componentdefinition namespace declaration and got the same error. I tried changing the remaining 2008s to 2012 and got the same error. Went back to 2010 and put the componentdefintion namespace back in and everything compiled again but still delivered the same error as I started with. Update: I found that this error was being caused by using parameters in local reports. It had nothing to do with the schema of the rdl. However, it is necessary to remove the query information from the rdl file when it includes parameter information.
    Wednesday, August 28, 2013 5:04 PM