Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用具有不同模式的2.RDLC报告_C#_.net_Rdlc - Fatal编程技术网

C# 使用具有不同模式的2.RDLC报告

C# 使用具有不同模式的2.RDLC报告,c#,.net,rdlc,C#,.net,Rdlc,我有一个问题,我不知道如何解决它 我有两个.rdlc报告,它们有两个不同的模式: 第一: http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition 第二: http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition 要运行第一个报告,我需要使用 Microsoft.ReportViewer.com.dll Microso

我有一个问题,我不知道如何解决它

我有两个
.rdlc
报告,它们有两个不同的模式:

第一:
http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition

第二:
http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition

要运行第一个报告,我需要使用
Microsoft.ReportViewer.com.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WinForms.dll
在版本
8.0.0.0

但当我尝试运行第二个报告时,出现了错误:

详细信息:报表定义的目标命名空间“”无效,无法升级

因此,我需要
.dll
版本
10.0.0
,但当我将
8.0.0.0
版本更改为
10.0.0.0
时,第一个报告停止工作,因为它需要
版本
8.0.0
中的
Microsoft.ReportViewer.WinForms

我想补充:

   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.ReportViewer.WinForms" publicKeyToken="89845dcd8080cc91" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
  </dependentAssembly>
</assemblyBinding>

在配置文件中,但不更改任何内容


有没有办法在一个程序中运行此报告的2

我使用了不同的
assemblyBinding
部分,并且我可以使用
ReportViewer 2010
显示旧的2005
rdlc
文件:

<?xml version="1.0"?>
<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.ReportViewer.ProcessingObjectModel" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.ReportViewer.Common" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.ReportViewer.WinForms" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
            </dependentAssembly>
        </assemblyBinding>      
    </runtime>
</configuration>