10

में ReportViewer 9 नियंत्रण का उपयोग कर मैं एक एएसपी.NET ऐप लिख रहा हूं जो एसएसआरएस सेटअप के साथ SQL सर्वर 2005 का उपयोग करता है। मैं ReportViewer नियंत्रण का उपयोग करना चाहता हूं लेकिन मुझे ReportViewer 10 का उपयोग करते समय एक त्रुटि मिलती है क्योंकि इसे एसएसआरएस 2008 की आवश्यकता होती है।वीएस 2010

मैं अपने एप्लिकेशन में ReportViewer 9 का उपयोग कैसे कर सकता हूं। मैं Microsoft.ReportViewer.WebForms.dll संस्करण 9 के लिए एक संदर्भ जोड़ा गया है और संस्करण के लिए संदर्भ से 10

मेरे मार्कअप इस प्रकार है निकाल दिया है:

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> 
<!-- standard markup --> 
<rsweb:ReportViewer ID="ReportViewer1" runat="server"></rsweb:ReportViewer> 

लेकिन जब मैं इस मैं चलाने का प्रयास निम्न त्रुटि प्राप्त करें:

CS0433: The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'

मुझे क्या याद आया है ??

अद्यतन: जब ReportViewer 10 उपयोग करने के लिए कोशिश कर रहा प्राप्त निम्न त्रुटि:

"Remote report processing requires Microsoft SQL Server 2008 Reporting Services or later."

उत्तर

13

, यह पता चल web.config फ़ाइल में 3 संदर्भ बदलने के लिए भूल गया:

भीतर HttpHandler:

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

और विधानसभाओं के भीतर:

<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" /> 
+1

मुझे पता चला कि आपको अपना चलाने की भी आवश्यकता होगी काम करने के लिए ReportViewer 9.0 के लिए क्लासिक मोड (ऐप पूल सेटिंग) में ऐप। –

+0

धन्यवाद यह पूरी तरह से काम किया .. –

2

पता नहीं क्यों, लेकिन आप अगर यह काम करता है की कोशिश करनी चाहिए: web.config को

<runtime> 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="b03f5f7f11d50a3a" /> 
    <bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/> 
    </dependentAssembly> 
</assemblyBinding> 

से पहले

</configuration> 

यह काम किया निम्नलिखित कोड जोड़ने मेरे लिए